Skip to content

Commit fa91c96

Browse files
added sql ent files
1 parent 5d1afe0 commit fa91c96

6 files changed

+1288
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BEGIN;
2+
3+
-- Drop cd_workflow_status_latest table
4+
DROP TABLE IF EXISTS "public"."cd_workflow_status_latest";
5+
6+
-- Drop sequence for cd_workflow_status_latest
7+
DROP SEQUENCE IF EXISTS id_seq_cd_workflow_status_latest;
8+
9+
-- Drop ci_workflow_status_latest table
10+
DROP TABLE IF EXISTS "public"."ci_workflow_status_latest";
11+
12+
-- Drop sequence for ci_workflow_status_latest
13+
DROP SEQUENCE IF EXISTS id_seq_ci_workflow_status_latest;
14+
15+
COMMIT;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
BEGIN;
2+
3+
-- Create Sequence for ci_workflow_status_latest
4+
CREATE SEQUENCE IF NOT EXISTS id_seq_ci_workflow_status_latest;
5+
6+
-- Create ci_workflow_status_latest table
7+
CREATE TABLE IF NOT EXISTS "public"."ci_workflow_status_latest" (
8+
"id" int4 NOT NULL DEFAULT nextval('id_seq_ci_workflow_status_latest'::regclass),
9+
"pipeline_id" int4 NOT NULL,
10+
"app_id" int4 NOT NULL,
11+
"ci_workflow_id" int4 NOT NULL,
12+
"created_on" timestamptz NOT NULL,
13+
"created_by" int4 NOT NULL,
14+
"updated_on" timestamptz NOT NULL,
15+
"updated_by" int4 NOT NULL,
16+
PRIMARY KEY ("id"),
17+
UNIQUE ("pipeline_id")
18+
);
19+
20+
-- Create Sequence for cd_workflow_status_latest
21+
CREATE SEQUENCE IF NOT EXISTS id_seq_cd_workflow_status_latest;
22+
23+
-- Create cd_workflow_status_latest table
24+
CREATE TABLE IF NOT EXISTS "public"."cd_workflow_status_latest" (
25+
"id" int4 NOT NULL DEFAULT nextval('id_seq_cd_workflow_status_latest'::regclass),
26+
"pipeline_id" int4 NOT NULL,
27+
"app_id" int4 NOT NULL,
28+
"environment_id" int4 NOT NULL,
29+
"workflow_type" varchar(20) NOT NULL, -- PRE, DEPLOY, POST
30+
"workflow_runner_id" int4 NOT NULL,
31+
"created_on" timestamptz NOT NULL,
32+
"created_by" int4 NOT NULL,
33+
"updated_on" timestamptz NOT NULL,
34+
"updated_by" int4 NOT NULL,
35+
PRIMARY KEY ("id"),
36+
UNIQUE ("pipeline_id", "workflow_type")
37+
);
38+
39+
COMMIT;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
BEGIN;
2+
3+
-- Drop table
4+
DROP TABLE IF EXISTS "public"."bulk_edit_config";
5+
6+
-- Drop sequence
7+
DROP SEQUENCE IF EXISTS id_seq_bulk_edit_config;
8+
9+
COMMIT;

0 commit comments

Comments
 (0)