salix/db/versions/11010-blackChrysanthemum/00-firstScript.sql

15 lines
656 B
MySQL
Raw Normal View History

2024-04-24 12:08:26 +00:00
ALTER TABLE vn.deviceProductionUser DROP INDEX IF EXISTS deviceProductionUser_UN;
ALTER TABLE vn.deviceProductionUser DROP FOREIGN KEY deviceProductionUser_FK;
ALTER TABLE vn.deviceProductionUser DROP PRIMARY KEY;
ALTER TABLE vn.deviceProductionUser ADD id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY FIRST;
2024-04-24 09:08:57 +00:00
ALTER TABLE vn.deviceProductionUser ADD CONSTRAINT deviceProductionUser_deviceProduction_FK FOREIGN KEY (deviceProductionFk) REFERENCES vn.deviceProduction(id);
ALTER TABLE vn.deviceProductionUser ADD CONSTRAINT deviceProductionUser_unique UNIQUE KEY (deviceProductionFk);
ALTER TABLE vn.deviceProduction ADD simSerialNumber TEXT NULL;