sql files

This commit is contained in:
dheepa
2021-07-02 08:40:37 +00:00
commit a0d3257be0
154 changed files with 49773 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
drop table if exists fw_core.db_run_status;
drop table if exists fw_core.Test_file_sheet_format_master;
CREATE TABLE fw_core.test_file_sheet_format_master (
syspk serial NOT NULL, -- PK
client_id int4 NOT NULL, -- UKA1
function_id int4 NOT NULL, -- UKA2
test_type text NOT NULL, -- UKA3
test_name text NOT NULL, -- UKA4
file_mnemonic text NOT NULL, -- UKA5
sheet_name text NOT NULL,
sheet_format text NOT NULL,
file_sheet_mnemonic text NOT NULL, -- UKA6
sheet_format_mnemonic text NULL,
stg2_function text NULL,
trx_function text NULL,
Created_By TEXT NULL DEFAULT current_user,
Updated_by text NULL,
Create_timestamp TIMESTAMP NULL DEFAULT now(),
update_timestamp TIMESTAMP NULL
);
CREATE TABLE fw_core.db_run_status
( syspk bigserial NOT NULL,
client_id int,
function_id int,
user_id int,
user_name text,
file_syspk int,
file_mnemonic text,
file_sheet_mnemonic text,
block_name text,
staging_type text,
error_function text,
error_state text,
error_message text,
error_detail text,
error_hint text,
error_context text,
status text,
error_timestamp timestamp default now(),
CONSTRAINT mmt_DB_error_pkey PRIMARY KEY (syspk)
);
drop table if exists fw_core.check_table_stg_trx_count;
create table fw_core.check_table_stg_trx_count
(
schema_name text,
table_name text,
row_count int,
create_time timestamp DEFAULT CURRENT_TIMESTAMP
);
drop table if exists fw_core.check_mnemonic_count;
create table fw_core.check_mnemonic_count
(
table_name text,
syspks text,
file_mnemonic text,
file_sheet_mnemonic text,
row_count int,
create_time timestamp DEFAULT current_timestamp
);
DROP TABLE if exists fw_core.check_model_count;
CREATE TABLE fw_core.check_model_count(
table_name text NULL,
syspks text NULL,
file_mnemonic text NULL,
file_sheet_mnemonic text NULL,
tractor_name text NULL,
row_count int4 NULL,
create_timestamp timestamp DEFAULT CURRENT_TIMESTAMP
);

View File

@@ -0,0 +1,19 @@
drop table if exists transactional.source_config;
CREATE TABLE transactional.source_config (
syspk serial NOT NULL,
file_mnemonic varchar(100) NULL,
file_sheet_mnemonic varchar(100) NULL,
block_tag varchar(100) NULL,
f1_source varchar(100) NULL,
f1_modified varchar(100) NULL,
f1_keyword varchar(100) NULL,
row_number_start int4 NULL,
row_previous_number int4 NULL,
row_read_end int4 NULL,
run_time timestamp NULL,
action varchar(50) NULL,
run_date date NULL,
keyword_status int4 NULL DEFAULT 0,
CONSTRAINT source_config_pkey PRIMARY KEY (syspk)
);
CREATE UNIQUE INDEX i_file_mnemonic_source_config ON transactional.source_config (file_mnemonic, file_sheet_mnemonic, f1_modified);

View File

@@ -0,0 +1,3 @@
SET search_path To staging2;
drop extension tablefunc;
create extension tablefunc;