META-INF.sql.init-devtools-sqlserver.sql Maven / Gradle / Ivy
The newest version!
-- 建表
create table ${SCHEMA}.diboot_column_ext
(
id bigint identity,
table_name VARCHAR(100) not null,
col_name VARCHAR(100) not null,
ref_type VARCHAR(10) null,
ref_relationship VARCHAR(10) null,
ref_table VARCHAR(100) null,
ref_column VARCHAR(100) null,
as_column VARCHAR(100) null,
object_bind VARCHAR(255) null,
on_target_bind tinyint null default 0,
form_type VARCHAR(50) null default 'INPUT',
extensions VARCHAR(500) null,
is_deleted tinyint not null default 0,
create_time datetime not null default CURRENT_TIMESTAMP,
update_time datetime null default CURRENT_TIMESTAMP,
constraint PK_diboot_column_ext primary key (id)
);
-- 创建索引
create nonclustered index idx_diboot_column_ext ON ${SCHEMA}.diboot_column_ext(table_name, col_name);
-- 创建面板记录表
CREATE TABLE ${SCHEMA}.diboot_custom_panel (
id bigint identity,
panel_name VARCHAR(100) NOT NULL,
panel_code VARCHAR(100) NOT NULL,
project_type VARCHAR(100) NOT NULL,
file_name VARCHAR(100) NOT NULL,
dir_path VARCHAR(100) NOT NULL DEFAULT '',
param_data VARCHAR(4000),
event_data VARCHAR(4000),
methods_data VARCHAR(4000),
config_data VARCHAR(4000),
is_deleted tinyint not null default 0,
create_time datetime not null default CURRENT_TIMESTAMP,
update_time datetime null default CURRENT_TIMESTAMP,
constraint PK_diboot_custom_panel primary key (id)
);
-- 建表
CREATE TABLE ${SCHEMA}.diboot_table_ext
(
id bigint identity,
table_name VARCHAR(100) not null,
obj_name VARCHAR(100) not null,
id_type VARCHAR(10) null,
module VARCHAR(100) null,
class_name VARCHAR(100) not null,
extensions VARCHAR(500) null,
is_deleted tinyint not null default 0,
create_time datetime not null default CURRENT_TIMESTAMP,
update_time datetime null default CURRENT_TIMESTAMP,
constraint PK_diboot_table_ext primary key (id)
);
-- 创建索引
CREATE nonclustered INDEX idx_diboot_table_ext ON diboot_table_ext(table_name);