-
Notifications
You must be signed in to change notification settings - Fork 0
/
wawa.sql
122 lines (111 loc) · 3.61 KB
/
wawa.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
CREATE TABLE wawa.tb_entity(
entity_id SERIAL NOT NULL PRIMARY KEY,
entity_type varchar(50),
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_entity_map(
entity_map_id SERIAL PRIMARY KEY,
entity_id integer NULL,
profile_id integer NULL,
brand_id integer NULL,
app_id integer NULL,
repo_id integer NULL,
path_id integer NULL,
component_id integer NULL,
task_id integer NULL,
is_active boolean DEFAULT true,
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_profile(
profile_id SERIAL PRIMARY KEY,
entity_id integer NULL,
profile_name varchar NULL,
email varchar NULL,
contact_no varchar(200) NULL,
password varchar(200) NOT NULL,
img_path varchar(200),
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone,
update_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_brand(
brand_id SERIAL PRIMARY KEY,
entity_id integer NULL,
brand_name varchar NULL,
trading_as varchar NULL,
registration_number varchar(200) NULL,
vat_number varchar(200) NOT NULL,
img_path varchar(200),
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone,
update_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_app(
app_id SERIAL PRIMARY KEY,
entity_id integer NULL,
app_name varchar NULL,
repo_id varchar(200) NULL,
path_staging varchar(200) NOT NULL,
path_production varchar(200),
config_staging jsonb NULL DEFAULT '{}',,
config_production jsonb NULL DEFAULT '{}',,
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone,
update_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_repo (
repo_id SERIAL PRIMARY KEY,
entity_id integer NOT NULL,
repo_name varchar NULL,
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_path (
path_id SERIAL PRIMARY KEY,
entity_id integer NOT NULL,
path_name varchar NULL,
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_component (
component_id SERIAL PRIMARY KEY,
entity_id integer NOT NULL,
component_name varchar NULL,
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_task(
task_id SERIAL PRIMARY KEY,
entity_id integer NULL,
assigned_to integer NULL,
created_by integer NULL,
brand_id integer NULL,
app_id integer NULL,
path_id varchar NULL,
component_id integer NULL,
task_name varchar NULL,
priority varchar NULL,
description text,
notes text,
type varchar NULL,
status varchar NULL,
kind varchar NULL,
size integer NULL,
percentage_complete varchar NULL,
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone,
update_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_comment(
comment_id SERIAL PRIMARY KEY,
entity_id integer NULL,
comment jsonb NULL DEFAULT '{}',,
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_upload (
upload_id SERIAL PRIMARY KEY,
entity_id integer NULL,
"type" varchar(255) NOT NULL,
linked_path varchar(255) NOT NULL,
name varchar(50),
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);
CREATE TABLE wawa.tb_audit_trail (
audit_trail_id SERIAL PRIMARY KEY,
entity_id integer NOT NULL,
audit jsonb NULL DEFAULT '{}',
create_date timestamp NULL DEFAULT 'now'::text::timestamp(0) without time zone
);