|
|
ALTER table wms_storage MODIFY column header_no VARCHAR(128) comment '上游单据单号';
|
|
|
ALTER table wms_storage MODIFY column wh_id BIGINT(20) null comment '仓库 Id,对应 wms_wh 表中的Id';
|
|
|
ALTER table wms_storage_mat MODIFY column wh_id BIGINT(20) null comment '仓库 Id,对应 wms_wh 表中的Id';
|
|
|
ALTER table wms_storage_mat MODIFY column rg_id BIGINT(20) null comment '库区 Id,对应 wms_rg 表中的Id';
|
|
|
ALTER table wms_storage_mat MODIFY column pn_id BIGINT(20) null comment '库区 Id,对应 wms_rg 表中的Id';
|
|
|
|
|
|
ALTER table wms_storage_log MODIFY column wh_id BIGINT(20) null comment '仓库 Id,对应 wms_wh 表中的Id';
|
|
|
ALTER table wms_storage_log MODIFY column rg_id BIGINT(20) null comment '库区 Id,对应 wms_rg 表中的Id';
|
|
|
ALTER table wms_storage_log MODIFY column pn_id BIGINT(20) null comment '库区 Id,对应 wms_rg 表中的Id';
|
|
|
|
|
|
UPDATE base_material set virtual_part = 'N';
|
|
|
ALTER TABLE base_material MODIFY COLUMN virtual_part CHAR ( 1 ) NOT NULL DEFAULT 'N' COMMENT '虚拟物料标识,只能填写Y和N,Y表示虚拟物料,N表示反之';
|
|
|
|
|
|
ALTER TABLE project_sale_order ADD COLUMN `project_name` VARCHAR (255) NOT NULL COMMENT '项目名称' after `contract_no`;
|
|
|
UPDATE project_sale_order set project_name = mould_name;
|
|
|
ALTER TABLE project_sale_order DROP COLUMN `mould_name`;
|
|
|
|
|
|
|
|
|
CREATE TABLE `base_equip` (
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增字段,唯一',
|
|
|
`name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '设备名称 唯一',
|
|
|
`mould_type_id` bigint(20) NOT NULL COMMENT '模具类型id,对应 base_mould_type 表中的id',
|
|
|
`status` tinyint(1) DEFAULT '1' COMMENT '状态,1表示正常,2表示禁用,默认是1',
|
|
|
`creator` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者',
|
|
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
`updater` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者',
|
|
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
|
|
`tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
|
|
|
PRIMARY KEY (`id`),
|
|
|
UNIQUE KEY `idx_name` (`name`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='设备信息';
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `pro_process_design`;
|
|
|
CREATE TABLE `pro_process_design` (
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增字段,唯一',
|
|
|
`plan_id` BIGINT(20) NOT NULL COMMENT '生产计划id',
|
|
|
`sale_order_id` BIGINT(20) NOT NULL COMMENT '销售订单id',
|
|
|
`sale_order_sub_id` BIGINT(20) COMMENT '销售订单子项id',
|
|
|
`process_design_type` varchar(64) not null COMMENT '设计类型 铸造工艺|3D图纸|2D图纸|毛坯图纸 FOUNDRY_TECHNOLOGY_BLUEPRINT|3D_BLUEPRINT|2D_BLUEPRINT|WORKBLANK_BLUEPRINT',
|
|
|
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态,1表示正常,2表示禁用',
|
|
|
`creator` varchar(64) DEFAULT '' COMMENT '创建者',
|
|
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
`updater` varchar(64) DEFAULT '' COMMENT '更新者',
|
|
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
|
|
`tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
) ENGINE=InnoDB COMMENT='工艺设计表';
|
|
|
|
|
|
DROP TABLE IF EXISTS `pro_process_design_progress`;
|
|
|
CREATE TABLE `pro_process_design_progress` (
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增字段,唯一',
|
|
|
`process_design_id` BIGINT(20) not null COMMENT '工艺设计id',
|
|
|
`progress` DECIMAL(20,6) not null DEFAULT '0' COMMENT '进度百分比(%)',
|
|
|
`blueprint_link` varchar(255) not null comment '图纸链接',
|
|
|
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态,1表示正常,2表示禁用',
|
|
|
`creator` varchar(64) DEFAULT '' COMMENT '创建者',
|
|
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
`updater` varchar(64) DEFAULT '' COMMENT '更新者',
|
|
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
|
|
`tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
) ENGINE=InnoDB COMMENT='工艺设计进度表';
|
|
|
|
|
|
ALTER TABLE project_deliver_order MODIFY COLUMN `deliver_mode` CHAR ( 1 ) COMMENT '发货方式';
|
|
|
|
|
|
ALTER TABLE wms_storage ADD COLUMN `v_mat_name` varchar(128) COMMENT '虚拟物料名称';
|