diff --git a/db/manufacturers.sql b/db/manufacturers.sql index eaee2630c..be15f9c01 100644 --- a/db/manufacturers.sql +++ b/db/manufacturers.sql @@ -1,23 +1,4 @@ INSERT INTO Manufacturers VALUES (1, 'Acti'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A21'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A23'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A24'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A28'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A31'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A310'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A311'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A32'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A41'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A415'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A416'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A418'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A42'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A421'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A43'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A45'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A46'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A48'); -INSERT INTO Models (ManufacturerId,Name) VALUES (1, 'A74'); INSERT INTO Manufacturers VALUES (2, 'Amcrest'); INSERT INTO Manufacturers VALUES (3, 'Airlink101'); INSERT INTO Manufacturers VALUES (4, 'Arecont Vision'); diff --git a/db/zm_update-1.37.3.sql b/db/zm_update-1.37.3.sql deleted file mode 100644 index 341c5e162..000000000 --- a/db/zm_update-1.37.3.sql +++ /dev/null @@ -1,47 +0,0 @@ -SET @s = (SELECT IF( - (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() - AND table_name = 'Monitors' - AND column_name = 'ManufacturerId' - ) > 0, -"SELECT 'Column ManufacturerId already exists in Monitors'", -"ALTER TABLE `Monitors` ADD `ManufacturerId` int(10) unsigned AFTER `StorageId`" -)); - -PREPARE stmt FROM @s; -EXECUTE stmt; - -SET @s = (SELECT IF( - (SELECT COUNT(*) FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE table_schema = DATABASE() - AND table_name = 'Monitors' - AND column_name = 'ManufacturerId' - ) > 0, -"SELECT 'FOREIGN KEY for ManufacturerId already exists in Monitors'", -"ALTER TABLE `Monitors` ADD FOREIGN KEY (`ManufacturerId`) REFERENCES `Manufacturers` (Id)" -)); - -PREPARE stmt FROM @s; -EXECUTE stmt; - -SET @s = (SELECT IF( - (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() - AND table_name = 'Monitors' - AND column_name = 'ModelId' - ) > 0, -"SELECT 'Column ModelId already exists in Monitors'", -"ALTER TABLE `Monitors` ADD `ModelId` int(10) unsigned AFTER `ManufacturerId`" -)); - -PREPARE stmt FROM @s; -EXECUTE stmt; - -SET @s = (SELECT IF( - (SELECT COUNT(*) FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE table_schema = DATABASE() - AND table_name = 'Monitors' - AND column_name = 'ModelId' - ) > 0, -"SELECT 'FOREIGN KEY for ModelId already exists in Monitors'", -"ALTER TABLE `Monitors` ADD FOREIGN KEY (`ModelId`) REFERENCES `Models` (Id)" -)); - -PREPARE stmt FROM @s; -EXECUTE stmt;