diff --git a/src/main/resources/db/changelog/changes/20251216_01_Enson/01_add_column.sql b/src/main/resources/db/changelog/changes/20251216_01_Enson/01_add_column.sql new file mode 100644 index 0000000..f0fa849 --- /dev/null +++ b/src/main/resources/db/changelog/changes/20251216_01_Enson/01_add_column.sql @@ -0,0 +1,59 @@ +-- liquibase formatted sql +-- changeset Enson:add_column + +create table `fpsmsdb`.`bag` ( + `id` int not null auto_increment, + `itemId` int not null, + `itemCode` varchar(255) not null, + `itemName` varchar(255) not null, + `takenBagBalance` int not null, + `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `createdBy` varchar(30) DEFAULT NULL, + `version` int NOT NULL DEFAULT '0', + `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `modifiedBy` varchar(30) DEFAULT NULL, + `deleted` tinyint(1) NOT NULL DEFAULT '0', +primary key (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +create table `fpsmsdb`.`bag_lot_line` ( + `id` int not null auto_increment, + `bagId` int not null, + `lotId` int not null, + `lotNo` varchar(255) not null, + `firstUseDate` datetime not null, + `lastUseDate` datetime not null, + `startQty` int not null, + `consumedQty` int not null, + `scrapQty` int not null, + `balanceQty` int not null, + `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `createdBy` varchar(30) DEFAULT NULL, + `version` int NOT NULL DEFAULT '0', + `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `modifiedBy` varchar(30) DEFAULT NULL, + `deleted` tinyint(1) NOT NULL DEFAULT '0', + primary key (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +create table `fpsmsdb`.`jo_bag_consumption` ( + `id` int not null auto_increment, + `bagId` int not null, + `bagLotLineId` int not null, + `jobId` int not null, + `jobOrderCode` varchar(255) not null, + `startQty` int not null, + `consumedQty` int not null, + `scrapQty` int not null, + `endQty` int not null, + `date` datetime not null, + `time` datetime not null, + `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `createdBy` varchar(30) DEFAULT NULL, + `version` int NOT NULL DEFAULT '0', + `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `modifiedBy` varchar(30) DEFAULT NULL, + `deleted` tinyint(1) NOT NULL DEFAULT '0', + primary key (`id`) + +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/src/main/resources/db/changelog/changes/20251217_01_Enson/01_drop_table.sql b/src/main/resources/db/changelog/changes/20251217_01_Enson/01_drop_table.sql new file mode 100644 index 0000000..8deb890 --- /dev/null +++ b/src/main/resources/db/changelog/changes/20251217_01_Enson/01_drop_table.sql @@ -0,0 +1,4 @@ +-- liquibase formatted sql +-- changeset Enson:add_column + +DROP TABLE IF EXISTS `fpsmsdb`.`equipment_type`; \ No newline at end of file