瀏覽代碼

create bag db, remove equipment_type

master
CANCERYS\kw093 10 小時之前
父節點
當前提交
a02b7b923a
共有 2 個檔案被更改,包括 63 行新增0 行删除
  1. +59
    -0
      src/main/resources/db/changelog/changes/20251216_01_Enson/01_add_column.sql
  2. +4
    -0
      src/main/resources/db/changelog/changes/20251217_01_Enson/01_drop_table.sql

+ 59
- 0
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;

+ 4
- 0
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`;

Loading…
取消
儲存