sql script update
This commit is contained in:
File diff suppressed because it is too large
Load Diff
9
web/db/oracle/create_user.sql
Normal file
9
web/db/oracle/create_user.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
create user jeesite
|
||||
identified by jeesite
|
||||
quota unlimited on users;
|
||||
|
||||
grant connect,resource,create session,select any table,
|
||||
create any view,create any table,create any index,
|
||||
drop any table,drop any view,drop any index
|
||||
to jeesite;
|
||||
125
web/db/oracle/gen.sql
Normal file
125
web/db/oracle/gen.sql
Normal file
@@ -0,0 +1,125 @@
|
||||
|
||||
/* Drop Indexes */
|
||||
|
||||
DROP INDEX idx_gen_table_ptn;
|
||||
DROP INDEX idx_gen_table_column_tn;
|
||||
|
||||
|
||||
|
||||
/* Drop Tables */
|
||||
|
||||
DROP TABLE js_gen_table_column CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_gen_table CASCADE CONSTRAINTS;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 代码生成表
|
||||
CREATE TABLE js_gen_table
|
||||
(
|
||||
table_name varchar2(64) NOT NULL,
|
||||
class_name varchar2(100) NOT NULL,
|
||||
comments nvarchar2(500) NOT NULL,
|
||||
parent_table_name varchar2(64),
|
||||
parent_table_fk_name varchar2(64),
|
||||
tpl_category varchar2(200),
|
||||
package_name varchar2(500),
|
||||
module_name varchar2(30),
|
||||
sub_module_name varchar2(30),
|
||||
function_name nvarchar2(200),
|
||||
function_name_simple nvarchar2(50),
|
||||
function_author nvarchar2(50),
|
||||
gen_base_dir nvarchar2(2000),
|
||||
options nvarchar2(2000),
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (table_name)
|
||||
);
|
||||
|
||||
|
||||
-- 代码生成表列
|
||||
CREATE TABLE js_gen_table_column
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
table_name varchar2(64) NOT NULL,
|
||||
column_name varchar2(64) NOT NULL,
|
||||
column_sort number(10),
|
||||
column_type varchar2(100) NOT NULL,
|
||||
column_label nvarchar2(50),
|
||||
comments nvarchar2(500) NOT NULL,
|
||||
attr_name varchar2(200) NOT NULL,
|
||||
attr_type varchar2(200) NOT NULL,
|
||||
is_pk char(1),
|
||||
is_null char(1),
|
||||
is_insert char(1),
|
||||
is_update char(1),
|
||||
is_list char(1),
|
||||
is_query char(1),
|
||||
query_type varchar2(200),
|
||||
is_edit char(1),
|
||||
show_type varchar2(200),
|
||||
dict_type varchar2(200),
|
||||
field_valid nvarchar2(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* Create Indexes */
|
||||
|
||||
CREATE INDEX idx_gen_table_ptn ON js_gen_table (parent_table_name);
|
||||
CREATE INDEX idx_gen_table_column_tn ON js_gen_table_column (table_name);
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE js_gen_table IS '代码生成表';
|
||||
COMMENT ON COLUMN js_gen_table.table_name IS '表名';
|
||||
COMMENT ON COLUMN js_gen_table.class_name IS '实体类名称';
|
||||
COMMENT ON COLUMN js_gen_table.comments IS '表说明';
|
||||
COMMENT ON COLUMN js_gen_table.parent_table_name IS '关联父表的表名';
|
||||
COMMENT ON COLUMN js_gen_table.parent_table_fk_name IS '本表关联父表的外键名';
|
||||
COMMENT ON COLUMN js_gen_table.tpl_category IS '使用的模板';
|
||||
COMMENT ON COLUMN js_gen_table.package_name IS '生成包路径';
|
||||
COMMENT ON COLUMN js_gen_table.module_name IS '生成模块名';
|
||||
COMMENT ON COLUMN js_gen_table.sub_module_name IS '生成子模块名';
|
||||
COMMENT ON COLUMN js_gen_table.function_name IS '生成功能名';
|
||||
COMMENT ON COLUMN js_gen_table.function_name_simple IS '生成功能名(简写)';
|
||||
COMMENT ON COLUMN js_gen_table.function_author IS '生成功能作者';
|
||||
COMMENT ON COLUMN js_gen_table.gen_base_dir IS '生成基础路径';
|
||||
COMMENT ON COLUMN js_gen_table.options IS '其它生成选项';
|
||||
COMMENT ON COLUMN js_gen_table.create_by IS '创建者';
|
||||
COMMENT ON COLUMN js_gen_table.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN js_gen_table.update_by IS '更新者';
|
||||
COMMENT ON COLUMN js_gen_table.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN js_gen_table.remarks IS '备注信息';
|
||||
COMMENT ON TABLE js_gen_table_column IS '代码生成表列';
|
||||
COMMENT ON COLUMN js_gen_table_column.id IS '编号';
|
||||
COMMENT ON COLUMN js_gen_table_column.table_name IS '表名';
|
||||
COMMENT ON COLUMN js_gen_table_column.column_name IS '列名';
|
||||
COMMENT ON COLUMN js_gen_table_column.column_sort IS '列排序(升序)';
|
||||
COMMENT ON COLUMN js_gen_table_column.column_type IS '类型';
|
||||
COMMENT ON COLUMN js_gen_table_column.column_label IS '列标签名';
|
||||
COMMENT ON COLUMN js_gen_table_column.comments IS '列备注说明';
|
||||
COMMENT ON COLUMN js_gen_table_column.attr_name IS '类的属性名';
|
||||
COMMENT ON COLUMN js_gen_table_column.attr_type IS '类的属性类型';
|
||||
COMMENT ON COLUMN js_gen_table_column.is_pk IS '是否主键';
|
||||
COMMENT ON COLUMN js_gen_table_column.is_null IS '是否可为空';
|
||||
COMMENT ON COLUMN js_gen_table_column.is_insert IS '是否插入字段';
|
||||
COMMENT ON COLUMN js_gen_table_column.is_update IS '是否更新字段';
|
||||
COMMENT ON COLUMN js_gen_table_column.is_list IS '是否列表字段';
|
||||
COMMENT ON COLUMN js_gen_table_column.is_query IS '是否查询字段';
|
||||
COMMENT ON COLUMN js_gen_table_column.query_type IS '查询方式';
|
||||
COMMENT ON COLUMN js_gen_table_column.is_edit IS '是否编辑字段';
|
||||
COMMENT ON COLUMN js_gen_table_column.show_type IS '表单类型';
|
||||
COMMENT ON COLUMN js_gen_table_column.dict_type IS '字典类型';
|
||||
COMMENT ON COLUMN js_gen_table_column.field_valid IS '字段验证';
|
||||
|
||||
|
||||
|
||||
136
web/db/oracle/test.sql
Normal file
136
web/db/oracle/test.sql
Normal file
@@ -0,0 +1,136 @@
|
||||
|
||||
/* Drop Tables */
|
||||
|
||||
DROP TABLE test_data CASCADE CONSTRAINTS;
|
||||
DROP TABLE test_data_child CASCADE CONSTRAINTS;
|
||||
DROP TABLE test_tree CASCADE CONSTRAINTS;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- test_data
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
test_input varchar2(200),
|
||||
test_textarea varchar2(200),
|
||||
test_select varchar2(10),
|
||||
test_select_multiple varchar2(200),
|
||||
test_radio varchar2(10),
|
||||
test_checkbox varchar2(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar2(64),
|
||||
test_office_code varchar2(64),
|
||||
test_company_code varchar2(64),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- test_data_child
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
test_sort number(10,0),
|
||||
test_data_id varchar2(64),
|
||||
test_input varchar2(200),
|
||||
test_textarea varchar2(200),
|
||||
test_select varchar2(10),
|
||||
test_select_multiple varchar2(200),
|
||||
test_radio varchar2(10),
|
||||
test_checkbox varchar2(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar2(64),
|
||||
test_office_code varchar2(64),
|
||||
test_company_code varchar2(64),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- test_tree
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
parent_code varchar2(64) NOT NULL,
|
||||
parent_codes varchar2(2000) NOT NULL,
|
||||
tree_sort number(10) NOT NULL,
|
||||
tree_sorts varchar2(1200) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level number(4) NOT NULL,
|
||||
tree_names varchar2(2000) NOT NULL,
|
||||
tree_name nvarchar2(200) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE test_data IS 'test_data';
|
||||
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_company_code 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 'test_data_child';
|
||||
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_company_code IS '公司选择';
|
||||
COMMENT ON TABLE test_tree IS 'test_tree';
|
||||
COMMENT ON COLUMN test_tree.id 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 '备注信息';
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user