add fact rest
This commit is contained in:
+123
-98
@@ -1,125 +1,150 @@
|
||||
SET MODE MYSQL;
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
set mode mysql;
|
||||
set names utf8mb4;
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
-- auto-generated definition
|
||||
create table IDX_DIMENSION
|
||||
drop table if exists idx_dimension;
|
||||
create table if not exists idx_dimension
|
||||
(
|
||||
DIMENSION_ID BIGINT auto_increment
|
||||
primary key,
|
||||
CREATE_BY CHARACTER,
|
||||
CREATE_TIME TIMESTAMP,
|
||||
UPDATE_BY CHARACTER,
|
||||
UPDATE_TIME TIMESTAMP,
|
||||
DIMENSION_CODE CHARACTER,
|
||||
DIMENSION_DESCRIPTION CHARACTER,
|
||||
DIMENSION_NAME CHARACTER,
|
||||
INDEX_DIMENSION BOOLEAN,
|
||||
TIME_DIMENSION BOOLEAN
|
||||
dimension_id bigint auto_increment primary key,
|
||||
create_by varchar(500),
|
||||
create_time timestamp,
|
||||
update_by varchar(500),
|
||||
update_time timestamp,
|
||||
dimension_code varchar(500),
|
||||
dimension_description varchar(500),
|
||||
dimension_name varchar(500),
|
||||
index_dimension boolean,
|
||||
time_dimension boolean
|
||||
);
|
||||
|
||||
|
||||
create table IDX_DIMENSION_ATTRIBUTE
|
||||
drop table if exists idx_dimension_attribute;
|
||||
create table if not exists idx_dimension_attribute
|
||||
(
|
||||
DIMENSION_ATTRIBUTE_ID BIGINT auto_increment
|
||||
primary key,
|
||||
CREATE_BY CHARACTER,
|
||||
CREATE_TIME TIMESTAMP,
|
||||
UPDATE_BY CHARACTER,
|
||||
UPDATE_TIME TIMESTAMP,
|
||||
ATTRIBUTE_CODE CHARACTER,
|
||||
ATTRIBUTE_DESCRIPTION CHARACTER,
|
||||
ATTRIBUTE_NAME CHARACTER,
|
||||
CODE_ATTRIBUTE BOOLEAN,
|
||||
KEY_ATTRIBUTE BOOLEAN,
|
||||
DIMENSION_ID BIGINT,
|
||||
constraint FK3PC4BATJ2JBLUJNRUHGFIV63G
|
||||
foreign key (DIMENSION_ID) references IDX_DIMENSION
|
||||
dimension_attribute_id bigint auto_increment primary key,
|
||||
create_by varchar(500),
|
||||
create_time timestamp,
|
||||
update_by varchar(500),
|
||||
update_time timestamp,
|
||||
attribute_code varchar(500),
|
||||
attribute_name varchar(500),
|
||||
description varchar(500),
|
||||
code_attribute boolean,
|
||||
key_attribute boolean,
|
||||
dimension_id bigint
|
||||
);
|
||||
|
||||
create table IDX_FACT
|
||||
drop table if exists idx_fact;
|
||||
create table if not exists idx_fact
|
||||
(
|
||||
FACT_ID BIGINT auto_increment
|
||||
primary key,
|
||||
CREATE_BY CHARACTER,
|
||||
CREATE_TIME TIMESTAMP,
|
||||
UPDATE_BY CHARACTER,
|
||||
UPDATE_TIME TIMESTAMP,
|
||||
FACT_CODE CHARACTER,
|
||||
FACT_DESCRIPTION CHARACTER,
|
||||
FACT_NAME CHARACTER
|
||||
fact_id bigint auto_increment primary key,
|
||||
create_by varchar(500),
|
||||
create_time timestamp,
|
||||
update_by varchar(500),
|
||||
update_time timestamp,
|
||||
fact_code varchar(500),
|
||||
description varchar(500),
|
||||
fact_name varchar(500)
|
||||
);
|
||||
|
||||
create table IDX_FACT_ATTRIBUTE
|
||||
drop table if exists idx_fact_attribute;
|
||||
create table if not exists idx_fact_attribute
|
||||
(
|
||||
FACT_ATTRIBUTE_ID BIGINT auto_increment
|
||||
primary key,
|
||||
CREATE_BY CHARACTER,
|
||||
CREATE_TIME TIMESTAMP,
|
||||
UPDATE_BY CHARACTER,
|
||||
UPDATE_TIME TIMESTAMP,
|
||||
ATTRIBUTE_CODE CHARACTER,
|
||||
ATTRIBUTE_DESCRIPTION CHARACTER,
|
||||
ATTRIBUTE_NAME CHARACTER,
|
||||
FACT_ID BIGINT,
|
||||
constraint FKS9HIC1SGFVP7J0NTA5LIOECD3
|
||||
foreign key (FACT_ID) references IDX_FACT
|
||||
fact_attribute_id bigint auto_increment primary key,
|
||||
create_by varchar(500),
|
||||
create_time timestamp,
|
||||
update_by varchar(500),
|
||||
update_time timestamp,
|
||||
attribute_code varchar(500),
|
||||
attribute_name varchar(500),
|
||||
description varchar(500),
|
||||
fact_id bigint
|
||||
);
|
||||
|
||||
create table IDX_INDEXES
|
||||
drop table if exists idx_indexes;
|
||||
create table if not exists idx_indexes
|
||||
(
|
||||
INDEX_ID BIGINT auto_increment
|
||||
primary key,
|
||||
CREATE_BY CHARACTER,
|
||||
CREATE_TIME TIMESTAMP,
|
||||
UPDATE_BY CHARACTER,
|
||||
UPDATE_TIME TIMESTAMP,
|
||||
BASED BOOLEAN,
|
||||
ENABLED BOOLEAN,
|
||||
INDEX_CALCULE_TYPE CHARACTER,
|
||||
INDEX_CATEGORY CHARACTER,
|
||||
INDEX_CODE CHARACTER,
|
||||
INDEX_DESCRIPTION CHARACTER,
|
||||
INDEX_FOLDER_ID CHARACTER,
|
||||
INDEX_NAME CHARACTER,
|
||||
INDEX_TYPE CHARACTER
|
||||
index_id bigint auto_increment primary key,
|
||||
create_by varchar(500),
|
||||
create_time timestamp,
|
||||
update_by varchar(500),
|
||||
update_time timestamp,
|
||||
based boolean,
|
||||
enabled boolean,
|
||||
index_calcule_type varchar(500),
|
||||
index_category varchar(500),
|
||||
index_code varchar(500),
|
||||
index_description varchar(500),
|
||||
index_folder_id varchar(500),
|
||||
index_name varchar(500),
|
||||
index_type varchar(500)
|
||||
);
|
||||
|
||||
create table IDX_MEASURE
|
||||
drop table if exists idx_fact_measure;
|
||||
create table if not exists idx_fact_measure
|
||||
(
|
||||
MEASURE_ID BIGINT auto_increment
|
||||
primary key,
|
||||
CREATE_BY CHARACTER,
|
||||
CREATE_TIME TIMESTAMP,
|
||||
UPDATE_BY CHARACTER,
|
||||
UPDATE_TIME TIMESTAMP,
|
||||
MEASURE_CODE CHARACTER,
|
||||
MEASURE_DESCRIPTION CHARACTER,
|
||||
MEASURE_NAME CHARACTER,
|
||||
MEASURE_TYPE CHARACTER,
|
||||
FACT_ID BIGINT,
|
||||
constraint FK5LVBNRVJGJLN15PQ2C37FLEYJ
|
||||
foreign key (FACT_ID) references IDX_FACT
|
||||
fact_measure_id bigint auto_increment primary key,
|
||||
measure_code varchar(10),
|
||||
measure_name varchar(1000),
|
||||
description varchar(1000),
|
||||
measure_type varchar(10),
|
||||
fact_id bigint,
|
||||
create_by varchar(100),
|
||||
create_time timestamp,
|
||||
update_by varchar(100),
|
||||
update_time timestamp
|
||||
);
|
||||
|
||||
create table IDX_MODEL
|
||||
drop table if exists idx_logic_model;
|
||||
create table if not exists idx_logic_model
|
||||
(
|
||||
DIMENSION_ID BIGINT auto_increment
|
||||
primary key,
|
||||
CREATE_BY CHARACTER,
|
||||
CREATE_TIME TIMESTAMP,
|
||||
UPDATE_BY CHARACTER,
|
||||
UPDATE_TIME TIMESTAMP,
|
||||
DIMENSION_CODE CHARACTER,
|
||||
DIMENSION_DESCRIPTION CHARACTER,
|
||||
DIMENSION_NAME CHARACTER,
|
||||
INDEX_DIMENSION BOOLEAN,
|
||||
TIME_DIMENSION BOOLEAN
|
||||
logic_model_id bigint auto_increment primary key comment '物理主键',
|
||||
model_name varchar(255) null,
|
||||
description varchar(255) null,
|
||||
fact_id bigint(30) null,
|
||||
table_definition_id bigint(30) null,
|
||||
create_by varchar(255) null,
|
||||
create_time timestamp,
|
||||
update_by varchar(255) null,
|
||||
update_time timestamp
|
||||
);
|
||||
|
||||
drop table if exists idx_table_definition;
|
||||
create table if not exists idx_table_definition
|
||||
(
|
||||
table_definition_id bigint auto_increment primary key comment '物理主键',
|
||||
table_name varchar(255) null,
|
||||
table_description varchar(255) null,
|
||||
remark varchar(255) null,
|
||||
enabled varchar(255) null,
|
||||
ds_id bigint(30) null,
|
||||
source_system varchar(255) null,
|
||||
difinition_type varchar(255) null,
|
||||
created tinyint(1) null,
|
||||
create_by varchar(255) null,
|
||||
create_time timestamp,
|
||||
update_by varchar(255) null,
|
||||
update_time timestamp
|
||||
);
|
||||
|
||||
|
||||
|
||||
BEGIN;
|
||||
COMMIT;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
begin;
|
||||
commit;
|
||||
set foreign_key_checks = 1;
|
||||
|
||||
|
||||
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (1, 'admin', null, null, null, 'RPT_BUS_ORG_CD_D', '机构', '机构', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (2, 'admin', null, null, null, 'RPT_BUSINESS_LINE_ID_D', '条线', '条线', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (3, 'admin', null, null, null, 'RPT_MIS_PROD_ID_D', '产品', '产品', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (4, 'admin', null, null, null, 'RPT_ADJ_TYPE_D', '调整类型', '调整类型', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (5, 'admin', null, null, null, 'RPT_BUS_ORG_CD_d', '机构', '机构', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (6, 'admin', null, null, null, 'RPT_CCY_CD_D', '币种', '币种', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (7, 'admin', null, null, null, 'RPT_PERIOD_CODe_d', '期间', '期间', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (8, 'admin', null, null, null, 'RPT_INDEX_D', '指标', '指标', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (9, 'admin', null, null, null, 'RPT_BUS_ORG_CD_ori_d', '原始机构', '原始机构', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (10, 'admin', null, null, null, 'RPT_DESK_D', 'DESK', 'DESK', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (11, 'admin', null, null, null, 'GRM_ORG_CODE', 'GRM机构', 'GRM机构', false, false);
|
||||
-- insert into public.idx_dimension (dimension_id, create_by, create_time, update_by, update_time, dimension_code, dimension_description, dimension_name, index_dimension, time_dimension) values (12, 'admin', null, null, null, 'RPT_DATE_D', '日期', '日期', false, false);
|
||||
|
||||
Reference in New Issue
Block a user