From d868d6c8f188fef4a0b6b63a269efb67d5429081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 12 Apr 2023 22:18:29 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20test=20=E8=A1=A8?= =?UTF-8?q?=E7=A7=9F=E6=88=B7id=E6=B2=A1=E6=9C=89=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/sql/oracle/oracle_test.sql | 4 ++-- script/sql/postgres/postgres_test.sql | 4 ++-- script/sql/sqlserver/sqlserver_test.sql | 4 ++-- script/sql/test.sql | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/script/sql/oracle/oracle_test.sql b/script/sql/oracle/oracle_test.sql index 365568e5..b4fc8814 100644 --- a/script/sql/oracle/oracle_test.sql +++ b/script/sql/oracle/oracle_test.sql @@ -1,6 +1,6 @@ create table test_demo ( id number(20) not null, - tenant_id varchar2(20) not null, + tenant_id varchar2(20) default '000000', dept_id number(20) default null, user_id number(20) default null, order_num number(10) default 0, @@ -35,7 +35,7 @@ comment on column test_demo.del_flag is '删除标志'; create table test_tree ( id number(20) not null, - tenant_id varchar2(20) not null, + tenant_id varchar2(20) default '000000', parent_id number(20) default 0, dept_id number(20) default null, user_id number(20) default null, diff --git a/script/sql/postgres/postgres_test.sql b/script/sql/postgres/postgres_test.sql index 0a7d3ffc..179096b3 100644 --- a/script/sql/postgres/postgres_test.sql +++ b/script/sql/postgres/postgres_test.sql @@ -2,7 +2,7 @@ DROP TABLE if EXISTS test_demo; create table if not exists test_demo ( id int8, - tenant_id varchar(20) not null, + tenant_id varchar(20) default '000000', dept_id int8, user_id int8, order_num int4 default 0, @@ -37,7 +37,7 @@ DROP TABLE if EXISTS test_tree; create table if not exists test_tree ( id int8, - tenant_id varchar(20) not null, + tenant_id varchar(20) default '000000', parent_id int8 default 0, dept_id int8, user_id int8, diff --git a/script/sql/sqlserver/sqlserver_test.sql b/script/sql/sqlserver/sqlserver_test.sql index e8e6dacd..87628bd6 100644 --- a/script/sql/sqlserver/sqlserver_test.sql +++ b/script/sql/sqlserver/sqlserver_test.sql @@ -1,7 +1,7 @@ CREATE TABLE test_demo ( id bigint NOT NULL, - tenant_id nvarchar(20) NOT NULL, + tenant_id nvarchar(20) DEFAULT ('000000') NULL, dept_id bigint NULL, user_id bigint NULL, order_num int DEFAULT ((0)) NULL, @@ -128,7 +128,7 @@ GO CREATE TABLE test_tree ( id bigint NOT NULL, - tenant_id nvarchar(20) NOT NULL, + tenant_id nvarchar(20) DEFAULT ('000000') NULL, parent_id bigint DEFAULT ((0)) NULL, dept_id bigint NULL, user_id bigint NULL, diff --git a/script/sql/test.sql b/script/sql/test.sql index 59257f0c..d4cea056 100644 --- a/script/sql/test.sql +++ b/script/sql/test.sql @@ -2,7 +2,7 @@ DROP TABLE if EXISTS test_demo; CREATE TABLE test_demo ( id bigint(0) NOT NULL COMMENT '主键', - tenant_id varchar(20) NOT NULL COMMENT '租户编号', + tenant_id varchar(20) NULL DEFAULT '000000' COMMENT '租户编号', dept_id bigint(0) NULL DEFAULT NULL COMMENT '部门id', user_id bigint(0) NULL DEFAULT NULL COMMENT '用户id', order_num int(0) NULL DEFAULT 0 COMMENT '排序号', @@ -22,7 +22,7 @@ DROP TABLE if EXISTS test_tree; CREATE TABLE test_tree ( id bigint(0) NOT NULL COMMENT '主键', - tenant_id varchar(20) NOT NULL COMMENT '租户编号', + tenant_id varchar(20) NULL DEFAULT '000000' COMMENT '租户编号', parent_id bigint(0) NULL DEFAULT 0 COMMENT '父id', dept_id bigint(0) NULL DEFAULT NULL COMMENT '部门id', user_id bigint(0) NULL DEFAULT NULL COMMENT '用户id',