diff --git a/hzims-service/safeproduct/src/main/resources/db/2.0.1.sql b/hzims-service/safeproduct/src/main/resources/db/2.0.1.sql index d5b243d..b1296e1 100644 --- a/hzims-service/safeproduct/src/main/resources/db/2.0.1.sql +++ b/hzims-service/safeproduct/src/main/resources/db/2.0.1.sql @@ -13,7 +13,7 @@ ALTER TABLE hzims_device ADD COLUMN unit varchar(50) NOT NULL COMMENT '单位'; -- 新增卫生自查模板表 -CREATE TABLE `hzims_hygiene_template` ( +CREATE TABLE IF NOT EXISTS `hzims_hygiene_template` ( `id` bigint(20) NOT NULL COMMENT '主键ID', `template_name` varchar(50) NOT NULL COMMENT '模板名称', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', @@ -27,7 +27,7 @@ CREATE TABLE `hzims_hygiene_template` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='卫生自查模板表'; -- 新增卫生自查模板详情表 -CREATE TABLE `hzims_hygiene_template_detail` ( +CREATE TABLE IF NOT EXISTS `hzims_hygiene_template_detail` ( `id` bigint(20) NOT NULL COMMENT '主键ID', `template_id` bigint(20) NOT NULL COMMENT '模板id', `zone` varchar(50) NOT NULL COMMENT '责任区',