Skip to content

Commit

Permalink
h2数据表增加备注信息
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed May 8, 2024
1 parent e76e631 commit 635ea8d
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 55 deletions.
57 changes: 57 additions & 0 deletions modules/core/core/db/h2/test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,60 @@ CREATE TABLE test_tree



/* Comments */

COMMENT ON TABLE test_data IS '测试数据';
COMMENT ON COLUMN test_data.id IS '编号';
COMMENT ON COLUMN test_data.test_input IS '单行文本';
COMMENT ON COLUMN test_data.test_textarea IS '多行文本';
COMMENT ON COLUMN test_data.test_select IS '下拉框';
COMMENT ON COLUMN test_data.test_select_multiple IS '下拉多选';
COMMENT ON COLUMN test_data.test_radio IS '单选框';
COMMENT ON COLUMN test_data.test_checkbox IS '复选框';
COMMENT ON COLUMN test_data.test_date IS '日期选择';
COMMENT ON COLUMN test_data.test_datetime IS '日期时间';
COMMENT ON COLUMN test_data.test_user_code IS '用户选择';
COMMENT ON COLUMN test_data.test_office_code IS '机构选择';
COMMENT ON COLUMN test_data.test_area_code IS '区域选择';
COMMENT ON COLUMN test_data.test_area_name IS '区域名称';
COMMENT ON COLUMN test_data.status IS '状态(0正常 1删除 2停用)';
COMMENT ON COLUMN test_data.create_by IS '创建者';
COMMENT ON COLUMN test_data.create_date IS '创建时间';
COMMENT ON COLUMN test_data.update_by IS '更新者';
COMMENT ON COLUMN test_data.update_date IS '更新时间';
COMMENT ON COLUMN test_data.remarks IS '备注信息';
COMMENT ON TABLE test_data_child IS '测试数据子表';
COMMENT ON COLUMN test_data_child.id IS '编号';
COMMENT ON COLUMN test_data_child.test_sort IS '排序号';
COMMENT ON COLUMN test_data_child.test_data_id IS '父表主键';
COMMENT ON COLUMN test_data_child.test_input IS '单行文本';
COMMENT ON COLUMN test_data_child.test_textarea IS '多行文本';
COMMENT ON COLUMN test_data_child.test_select IS '下拉框';
COMMENT ON COLUMN test_data_child.test_select_multiple IS '下拉多选';
COMMENT ON COLUMN test_data_child.test_radio IS '单选框';
COMMENT ON COLUMN test_data_child.test_checkbox IS '复选框';
COMMENT ON COLUMN test_data_child.test_date IS '日期选择';
COMMENT ON COLUMN test_data_child.test_datetime IS '日期时间';
COMMENT ON COLUMN test_data_child.test_user_code IS '用户选择';
COMMENT ON COLUMN test_data_child.test_office_code IS '机构选择';
COMMENT ON COLUMN test_data_child.test_area_code IS '区域选择';
COMMENT ON COLUMN test_data_child.test_area_name IS '区域名称';
COMMENT ON TABLE test_tree IS '测试树表';
COMMENT ON COLUMN test_tree.tree_code IS '节点编码';
COMMENT ON COLUMN test_tree.parent_code IS '父级编号';
COMMENT ON COLUMN test_tree.parent_codes IS '所有父级编号';
COMMENT ON COLUMN test_tree.tree_sort IS '排序号(升序)';
COMMENT ON COLUMN test_tree.tree_sorts IS '所有排序号';
COMMENT ON COLUMN test_tree.tree_leaf IS '是否最末级';
COMMENT ON COLUMN test_tree.tree_level IS '层次级别';
COMMENT ON COLUMN test_tree.tree_names IS '全节点名';
COMMENT ON COLUMN test_tree.tree_name IS '节点名称';
COMMENT ON COLUMN test_tree.status IS '状态(0正常 1删除 2停用)';
COMMENT ON COLUMN test_tree.create_by IS '创建者';
COMMENT ON COLUMN test_tree.create_date IS '创建时间';
COMMENT ON COLUMN test_tree.update_by IS '更新者';
COMMENT ON COLUMN test_tree.update_date IS '更新时间';
COMMENT ON COLUMN test_tree.remarks IS '备注信息';



71 changes: 60 additions & 11 deletions modules/core/core/src/main/resources/db/create/h2/test.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@

/* Drop Tables */

DROP TABLE test_data;
DROP TABLE test_data_child;
DROP TABLE test_tree;




/* Create Tables */

Expand Down Expand Up @@ -63,12 +55,12 @@ CREATE TABLE test_tree
(
tree_code varchar(64) NOT NULL,
parent_code varchar(64) NOT NULL,
parent_codes varchar(1000) NOT NULL,
parent_codes varchar(767) NOT NULL,
tree_sort decimal(10) NOT NULL,
tree_sorts varchar(1000) NOT NULL,
tree_sorts varchar(767) NOT NULL,
tree_leaf char(1) NOT NULL,
tree_level decimal(4) NOT NULL,
tree_names varchar(1000) NOT NULL,
tree_names varchar(767) NOT NULL,
tree_name varchar(200) NOT NULL,
status char(1) DEFAULT '0' NOT NULL,
create_by varchar(64) NOT NULL,
Expand All @@ -81,3 +73,60 @@ CREATE TABLE test_tree



/* Comments */

COMMENT ON TABLE test_data IS '测试数据';
COMMENT ON COLUMN test_data.id IS '编号';
COMMENT ON COLUMN test_data.test_input IS '单行文本';
COMMENT ON COLUMN test_data.test_textarea IS '多行文本';
COMMENT ON COLUMN test_data.test_select IS '下拉框';
COMMENT ON COLUMN test_data.test_select_multiple IS '下拉多选';
COMMENT ON COLUMN test_data.test_radio IS '单选框';
COMMENT ON COLUMN test_data.test_checkbox IS '复选框';
COMMENT ON COLUMN test_data.test_date IS '日期选择';
COMMENT ON COLUMN test_data.test_datetime IS '日期时间';
COMMENT ON COLUMN test_data.test_user_code IS '用户选择';
COMMENT ON COLUMN test_data.test_office_code IS '机构选择';
COMMENT ON COLUMN test_data.test_area_code IS '区域选择';
COMMENT ON COLUMN test_data.test_area_name IS '区域名称';
COMMENT ON COLUMN test_data.status IS '状态(0正常 1删除 2停用)';
COMMENT ON COLUMN test_data.create_by IS '创建者';
COMMENT ON COLUMN test_data.create_date IS '创建时间';
COMMENT ON COLUMN test_data.update_by IS '更新者';
COMMENT ON COLUMN test_data.update_date IS '更新时间';
COMMENT ON COLUMN test_data.remarks IS '备注信息';
COMMENT ON TABLE test_data_child IS '测试数据子表';
COMMENT ON COLUMN test_data_child.id IS '编号';
COMMENT ON COLUMN test_data_child.test_sort IS '排序号';
COMMENT ON COLUMN test_data_child.test_data_id IS '父表主键';
COMMENT ON COLUMN test_data_child.test_input IS '单行文本';
COMMENT ON COLUMN test_data_child.test_textarea IS '多行文本';
COMMENT ON COLUMN test_data_child.test_select IS '下拉框';
COMMENT ON COLUMN test_data_child.test_select_multiple IS '下拉多选';
COMMENT ON COLUMN test_data_child.test_radio IS '单选框';
COMMENT ON COLUMN test_data_child.test_checkbox IS '复选框';
COMMENT ON COLUMN test_data_child.test_date IS '日期选择';
COMMENT ON COLUMN test_data_child.test_datetime IS '日期时间';
COMMENT ON COLUMN test_data_child.test_user_code IS '用户选择';
COMMENT ON COLUMN test_data_child.test_office_code IS '机构选择';
COMMENT ON COLUMN test_data_child.test_area_code IS '区域选择';
COMMENT ON COLUMN test_data_child.test_area_name IS '区域名称';
COMMENT ON TABLE test_tree IS '测试树表';
COMMENT ON COLUMN test_tree.tree_code IS '节点编码';
COMMENT ON COLUMN test_tree.parent_code IS '父级编号';
COMMENT ON COLUMN test_tree.parent_codes IS '所有父级编号';
COMMENT ON COLUMN test_tree.tree_sort IS '排序号(升序)';
COMMENT ON COLUMN test_tree.tree_sorts IS '所有排序号';
COMMENT ON COLUMN test_tree.tree_leaf IS '是否最末级';
COMMENT ON COLUMN test_tree.tree_level IS '层次级别';
COMMENT ON COLUMN test_tree.tree_names IS '全节点名';
COMMENT ON COLUMN test_tree.tree_name IS '节点名称';
COMMENT ON COLUMN test_tree.status IS '状态(0正常 1删除 2停用)';
COMMENT ON COLUMN test_tree.create_by IS '创建者';
COMMENT ON COLUMN test_tree.create_date IS '创建时间';
COMMENT ON COLUMN test_tree.update_by IS '更新者';
COMMENT ON COLUMN test_tree.update_date IS '更新时间';
COMMENT ON COLUMN test_tree.remarks IS '备注信息';



14 changes: 3 additions & 11 deletions modules/core/core/src/main/resources/db/create/mssql/test.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@

/* Drop Tables */

IF OBJECT_ID('[test_data]') IS NOT NULL DROP TABLE [test_data];
IF OBJECT_ID('[test_data_child]') IS NOT NULL DROP TABLE [test_data_child];
IF OBJECT_ID('[test_tree]') IS NOT NULL DROP TABLE [test_tree];




/* Create Tables */

Expand Down Expand Up @@ -63,12 +55,12 @@ CREATE TABLE [test_tree]
(
[tree_code] varchar(64) NOT NULL,
[parent_code] varchar(64) NOT NULL,
[parent_codes] varchar(1000) NOT NULL,
[parent_codes] varchar(767) NOT NULL,
[tree_sort] decimal(10) NOT NULL,
[tree_sorts] varchar(1000) NOT NULL,
[tree_sorts] varchar(767) NOT NULL,
[tree_leaf] char(1) NOT NULL,
[tree_level] decimal(4) NOT NULL,
[tree_names] varchar(1000) NOT NULL,
[tree_names] varchar(767) NOT NULL,
[tree_name] nvarchar(200) NOT NULL,
[status] char(1) DEFAULT '0' NOT NULL,
[create_by] varchar(64) NOT NULL,
Expand Down
14 changes: 3 additions & 11 deletions modules/core/core/src/main/resources/db/create/mysql/test.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
SET SESSION FOREIGN_KEY_CHECKS=0;

/* Drop Tables */

DROP TABLE IF EXISTS test_data;
DROP TABLE IF EXISTS test_data_child;
DROP TABLE IF EXISTS test_tree;




/* Create Tables */

Expand Down Expand Up @@ -64,12 +56,12 @@ CREATE TABLE test_tree
(
tree_code varchar(64) NOT NULL COMMENT '节点编码',
parent_code varchar(64) NOT NULL COMMENT '父级编号',
parent_codes varchar(1000) NOT NULL COMMENT '所有父级编号',
parent_codes varchar(767) NOT NULL COMMENT '所有父级编号',
tree_sort decimal(10) NOT NULL COMMENT '排序号(升序)',
tree_sorts varchar(1000) NOT NULL COMMENT '所有排序号',
tree_sorts varchar(767) NOT NULL COMMENT '所有排序号',
tree_leaf char(1) NOT NULL COMMENT '是否最末级',
tree_level decimal(4) NOT NULL COMMENT '层次级别',
tree_names varchar(1000) NOT NULL COMMENT '全节点名',
tree_names varchar(767) NOT NULL COMMENT '全节点名',
tree_name varchar(200) NOT NULL COMMENT '节点名称',
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
create_by varchar(64) NOT NULL COMMENT '创建者',
Expand Down
14 changes: 3 additions & 11 deletions modules/core/core/src/main/resources/db/create/oracle/test.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@

/* Drop Tables */

DROP TABLE test_data CASCADE CONSTRAINTS;
DROP TABLE test_data_child CASCADE CONSTRAINTS;
DROP TABLE test_tree CASCADE CONSTRAINTS;




/* Create Tables */

Expand Down Expand Up @@ -63,12 +55,12 @@ CREATE TABLE test_tree
(
tree_code varchar2(64) NOT NULL,
parent_code varchar2(64) NOT NULL,
parent_codes varchar2(1000) NOT NULL,
parent_codes varchar2(767) NOT NULL,
tree_sort number(10) NOT NULL,
tree_sorts varchar2(1000) NOT NULL,
tree_sorts varchar2(767) NOT NULL,
tree_leaf char(1) NOT NULL,
tree_level number(4) NOT NULL,
tree_names varchar2(1000) NOT NULL,
tree_names varchar2(767) NOT NULL,
tree_name nvarchar2(200) NOT NULL,
status char(1) DEFAULT '0' NOT NULL,
create_by varchar2(64) NOT NULL,
Expand Down
14 changes: 3 additions & 11 deletions modules/core/core/src/main/resources/db/create/postgresql/test.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@

/* Drop Tables */

DROP TABLE IF EXISTS test_data;
DROP TABLE IF EXISTS test_data_child;
DROP TABLE IF EXISTS test_tree;




/* Create Tables */

Expand Down Expand Up @@ -63,12 +55,12 @@ CREATE TABLE test_tree
(
tree_code varchar(64) NOT NULL,
parent_code varchar(64) NOT NULL,
parent_codes varchar(1000) NOT NULL,
parent_codes varchar(767) NOT NULL,
tree_sort decimal(10) NOT NULL,
tree_sorts varchar(1000) NOT NULL,
tree_sorts varchar(767) NOT NULL,
tree_leaf char(1) NOT NULL,
tree_level decimal(4) NOT NULL,
tree_names varchar(1000) NOT NULL,
tree_names varchar(767) NOT NULL,
tree_name varchar(200) NOT NULL,
status char(1) DEFAULT '0' NOT NULL,
create_by varchar(64) NOT NULL,
Expand Down

0 comments on commit 635ea8d

Please sign in to comment.