From f1370d69603c64fb099f6277f6a600a4c962cd3e Mon Sep 17 00:00:00 2001 From: Jbreso Date: Tue, 29 Oct 2024 12:13:25 +0100 Subject: [PATCH] feat: refs#8174 simSupplier --- .../11327-maroonOak/00-firstScript.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db/versions/11327-maroonOak/00-firstScript.sql diff --git a/db/versions/11327-maroonOak/00-firstScript.sql b/db/versions/11327-maroonOak/00-firstScript.sql new file mode 100644 index 000000000..973050fba --- /dev/null +++ b/db/versions/11327-maroonOak/00-firstScript.sql @@ -0,0 +1,19 @@ +CREATE TABLE IF NOT EXISTS `vn`.`simSupplier` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `line` int(9) unsigned DEFAULT NULL, + `ext` int(10) unsigned DEFAULT NULL, + `pin` int(4) unsigned DEFAULT NULL, + `sim` VARCHAR(25), + `puk` int(10) unsigned DEFAULT NULL, + `statusWeb` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sim_UNIQUE` (`sim`) +) ENGINE=InnoDB AUTO_INCREMENT=1 + DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +ALTER TABLE `deviceProductionUser` +MODIFY `simSerialNumber` VARCHAR(25); + +ALTER TABLE vn.deviceProductionUser ADD CONSTRAINT deviceProductionUser_simSupplier_FK + FOREIGN KEY (simSerialNumber) REFERENCES vn.simSupplier(sim); + -- 2.40.1