Ad Widget

Collapse

Upgrade 1.1 -> 1.4 loses 'Applications'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • azilber
    Member
    • Apr 2005
    • 33

    #1

    Upgrade 1.1 -> 1.4 loses 'Applications'

    Doing the upgrade, all the items associated with a particulate application became unassociated. What a mess.

    For some reason also the user 'Admin' did not get type=3 (even though that's in the patch.sql). Very strange.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Fixed statement for migration of users:
    Code:
    update users_tmp set type=3 where [b][color=DarkRed]alias[/color][/b]='Admin';
    Fixed items_applications migration script (MySQL):
    Code:
    CREATE TABLE items_applications_tmp (
    		itemappid			   bigint unsigned		 NOT NULL auto_increment,
    		applicationid		   bigint unsigned		 DEFAULT '0'	 NOT NULL,
    		itemid		  bigint unsigned		 DEFAULT '0'	 NOT NULL,
    		PRIMARY KEY (itemappid)
    ) ENGINE=InnoDB;
    CREATE INDEX items_applications_1 on items_applications_tmp (applicationid,itemid);
    
    insert into items_applications_tmp select NULL,applicationid,[b][color=DarkRed]itemid[/color][/b] from items_applications;
    drop table items_applications;
    alter table items_applications_tmp rename items_applications;
    
    CREATE TABLE items_applications_tmp (
    		itemappid			   bigint unsigned		 DEFAULT '0'	 NOT NULL,
    		applicationid		   bigint unsigned		 DEFAULT '0'	 NOT NULL,
    		itemid		  bigint unsigned		 DEFAULT '0'	 NOT NULL,
    		PRIMARY KEY (itemappid)
    ) ENGINE=InnoDB;
    CREATE INDEX items_applications_1 on items_applications_tmp (applicationid,itemid);
    
    insert into items_applications_tmp select * from items_applications;
    drop table items_applications;
    alter table items_applications_tmp rename items_applications;
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • tronite
      Senior Member
      • Jun 2007
      • 147

      #3
      Originally posted by Alexei
      Fixed statement for migration of users:
      Code:
      update users_tmp set type=3 where [b][color=DarkRed]alias[/color][/b]='Admin';
      Fixed items_applications migration script (MySQL):
      Code:
      CREATE TABLE items_applications_tmp (
      		itemappid			   bigint unsigned		 NOT NULL auto_increment,
      		applicationid		   bigint unsigned		 DEFAULT '0'	 NOT NULL,
      		itemid		  bigint unsigned		 DEFAULT '0'	 NOT NULL,
      		PRIMARY KEY (itemappid)
      ) ENGINE=InnoDB;
      CREATE INDEX items_applications_1 on items_applications_tmp (applicationid,itemid);
      
      insert into items_applications_tmp select NULL,applicationid,[b][color=DarkRed]itemid[/color][/b] from items_applications;
      drop table items_applications;
      alter table items_applications_tmp rename items_applications;
      
      CREATE TABLE items_applications_tmp (
      		itemappid			   bigint unsigned		 DEFAULT '0'	 NOT NULL,
      		applicationid		   bigint unsigned		 DEFAULT '0'	 NOT NULL,
      		itemid		  bigint unsigned		 DEFAULT '0'	 NOT NULL,
      		PRIMARY KEY (itemappid)
      ) ENGINE=InnoDB;
      CREATE INDEX items_applications_1 on items_applications_tmp (applicationid,itemid);
      
      insert into items_applications_tmp select * from items_applications;
      drop table items_applications;
      alter table items_applications_tmp rename items_applications;
      Sorry to ask, but is there a mailing list where we can be told as users beforehand of such issues?

      Comment

      • tronite
        Senior Member
        • Jun 2007
        • 147

        #4
        Sorry about the last post I just realised that there is a forum dedicated to just the patches!

        Comment

        Working...