View Issue Details

IDProjectCategoryView StatusLast Update
1559RackTablesdefaultpublic2017-02-09 11:56
Reporterhoyanf Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformLinuxOSCentOSOS Version6.4
Product Version0.20.10 
Summary1559: Upgrade from 0.19.10
DescriptionCreated new db with collate utf8
Restored original db
Changed all tables collate to utf8_unicode_ci

Errors encountered when upgrading :-

# Executing batch '0.19.11'
ALTER TABLE AttributeValue ADD COLUMN object_tid int(10) unsigned NOT NULL default 0 AFTER object_id
 -- Duplicate column name 'object_tid'
ALTER TABLE AttributeValue ADD CONSTRAINT `AttributeValue-FK-map` FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES `AttributeMap` (`objtype_id`, `attr_id`)
 -- Cannot add or update a child row: a foreign key constraint fails (`racktable`.`#sql-c3d_3f21`, CONSTRAINT `AttributeValue-FK-map` FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES `AttributeMap` (`objtype_id`, `attr_id`))

# Executing batch '0.19.13’
UPDATE AttributeValue SET uint_value=UNIX_TIMESTAMP(STR_TO_DATE(string_value, '%m/%d/%Y')) WHERE attr_id IN(21,22,24)
 -- Incorrect datetime value: 'expired' for function str_to_date

# Executing batch '0.19.14’
ALTER TABLE AttributeValue CHANGE COLUMN `object_id` `object_id` INT(10) UNSIGNED NOT NULL
 -- Invalid use of NULL value
ALTER TABLE AttributeValue CHANGE COLUMN `attr_id` `attr_id` INT(10) UNSIGNED NOT NULL
 -- Invalid use of NULL value
ALTER TABLE AttributeValue ADD PRIMARY KEY (`object_id`, `attr_id`), DROP INDEX `object_id`
 -- Invalid use of NULL value

# Executing batch '0.20.7'
ALTER TABLE `LDAPCache` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci
 -- Invalid default value for 'last_retry'
ALTER TABLE `VLANSwitch` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci
 -- Invalid default value for 'last_change'

# Executing batch '0.20.8'
ALTER TABLE PortInterfaceCompat ADD CONSTRAINT `PortInterfaceCompat-FK-oif_id` FOREIGN KEY (oif_id) REFERENCES PortOuterInterface (id)
 -- Cannot add or update a child row: a foreign key constraint fails (`racktable`.`#sql-c3d_3ab4`, CONSTRAINT `PortInterfaceCompat-FK-oif_id` FOREIGN KEY (`oif_id`) REFERENCES `PortOuterInterface` (`id`))

ALTER TABLE PortCompat ADD CONSTRAINT `PortCompat-FK-oif_id1` FOREIGN KEY (type1) REFERENCES PortOuterInterface (id)
 -- Cannot add or update a child row: a foreign key constraint fails (`racktable`.`#sql-c3d_3ab4`, CONSTRAINT `PortCompat-FK-oif_id1` FOREIGN KEY (`type1`) REFERENCES `PortOuterInterface` (`id`))

ALTER TABLE PortCompat ADD CONSTRAINT `PortCompat-FK-oif_id2` FOREIGN KEY (type2) REFERENCES PortOuterInterface (id)
 -- Cannot add or update a child row: a foreign key constraint fails (`racktable`.`#sql-c3d_3ab4`, CONSTRAINT `PortCompat-FK-oif_id2` FOREIGN KEY (`type2`) REFERENCES `PortOuterInterface` (`id`))

INSERT INTO PatchCableOIFCompat (pctype_id, oif_id) VALUES
(13,18),(14,18),(15,18),(16,18),(17,18),(999,18), -- 10Base-T: Cat.3+ TP
(11,1198),(12,1198),(11,1199),(12,1199), -- 100Base-BX10: 1xSMF
(5,1197),(6,1197), -- 100Base-LX10: 2xSMF
(5,1200),(6,1200), -- 100Base-EX: 2xSMF
(5,1201),(6,1201), -- 100Base-ZX: 2xSMF
(1,1195),(2,1195),(3,1195),(4,1195), -- 100Base-FX: 2xMMF
(1,1196),(2,1196),(3,1196),(4,1196), -- 100Base-SX: 2xMMF
(13,19),(14,19),(15,19),(16,19),(17,19), -- 100Base-TX: Cat.5+ TP
(11,1206),(12,1206),(11,1207),(12,1207), -- 1000Base-BX10: 1xSMF
(5,1204),(6,1204), -- 1000Base-LX: 2xSMF
(5,1205),(6,1205), -- 1000Base-LX10: 2xSMF
(1,1202),(2,1202),(3,1202),(4,1202), -- 1000Base-SX: 2xMMF
(1,1203),(2,1203),(3,1203),(4,1203), -- 1000Base-SX+: 2xMMF
(13,24),(14,24),(15,24),(16,24),(17,24), -- 1000Base-T: Cat.5+ TP
(5,34),(6,34), -- 1000Base-ZX: 2xSMF
(23,1077), -- 1000Base direct attach: shielded
(1,30),(2,30),(3,30),(4,30), -- 10GBase-SR: 2xMMF
(5,36),(6,36), -- 10GBase-LR: 2xSMF
(5,35),(6,35), -- 10GBase-ER: 2xSMF
(5,38),(6,38), -- 10GBase-ZR: 2xSMF
(1,39),(2,39),(3,39),(4,39),(5,39),(6,39), -- 10GBase-LX4: 2xMMF/2xSMF
(1,37),(2,37),(3,37),(4,37), -- 10GBase-LRM: 2xMMF
(14,1642),(15,1642),(16,1642),(17,1642), -- 10GBase-T: Cat.6+ TP
(20,40), -- 10GBase-CX4: coax
(24,1084),(25,1084),(26,1084),(27,1084), -- 10GBase direct attach: twinax
(18,1663),(19,1663), -- 40GBase-SR4: 8xMMF
(5,1664),(6,1664), -- 40GBase-LR4: 2xSMF
(5,1662),(6,1662), -- 40GBase-ER4: 2xSMF
(5,1660),(6,1660), -- 40GBase-FR: 2xSMF
(21,1669),(22,1669), -- 100GBase-SR10: 20xMMF
(18,1672),(19,1672), -- 100GBase-SR4: 8xMMF
(5,1670),(6,1670), -- 100GBase-LR4: 2xSMF
(5,1671),(6,1671) -- 100GBase-ER4: 2xSMF
 -- Cannot add or update a child row: a foreign key constraint fails (`racktable`.`PatchCableOIFCompat`, CONSTRAINT `PatchCableOIFCompat-FK-oif_id` FOREIGN KEY (`oif_id`) REFERENCES `PortOuterInterface` (`id`))
Steps To ReproduceTried restore multiple time still encountered with same errors.
Additional InformationServer Details :-
php -v
PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

mysql -V
mysql Ver 14.14 Distrib 5.7.10, for Linux (x86_64) using EditLine wrapper

apachectl -v
Server version: Apache/2.2.15 (Unix)
Server built: Aug 24 2015 17:52:49
TagsNo tags attached.

Activities

infrastation

infrastation

2015-12-14 16:26

administrator   ~0003049

# Executing batch '0.19.11'
ALTER TABLE AttributeValue ADD COLUMN object_tid int(10) unsigned NOT NULL default 0 AFTER object_id
 -- Duplicate column name 'object_tid'

In RackTables 0.19.10 the table AttributeValue does not have a column object_tid. The RackTables instance you are trying to upgrade is different from 0.19.10. Do you know what is the history behind it?
infrastation

infrastation

2017-02-09 11:56

administrator   ~0003535

Closing due to no feedback.

Issue History

Date Modified Username Field Change
2015-12-13 17:02 hoyanf New Issue
2015-12-14 16:26 infrastation Note Added: 0003049
2017-02-09 11:56 infrastation Note Added: 0003535
2017-02-09 11:56 infrastation Status new => closed
2017-02-09 11:56 infrastation Resolution open => unable to reproduce