Skip to content

Commit 2e2388c

Browse files
committed
added: migration script
1 parent e0c28c0 commit 2e2388c

File tree

2 files changed

+137
-0
lines changed

2 files changed

+137
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--
2+
-- Dropping table: project_management_tool_config; Schema: public; Owner: postgres
3+
--
4+
DROP TABLE "public"."project_management_tool_config" CASCADE;
5+
--
6+
-- Dropping table: db_migration_config; Schema: public; Owner: postgres
7+
--
8+
DROP TABLE "public"."db_migration_config" CASCADE;
9+
--
10+
-- Dropping table: db_config; Schema: public; Owner: postgres
11+
--
12+
DROP TABLE "public"."db_config" CASCADE;
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
CREATE TABLE public.project_management_tool_config (
2+
id integer NOT NULL,
3+
user_name character varying(250) NOT NULL,
4+
account_url character varying(250) NOT NULL,
5+
auth_token character varying(250) NOT NULL,
6+
commit_message_regex character varying(250) NOT NULL,
7+
final_issue_status character varying(250) NOT NULL,
8+
pipeline_stage character varying(250) NOT NULL,
9+
pipeline_id integer NOT NULL,
10+
created_on timestamp with time zone NOT NULL,
11+
updated_on timestamp with time zone NOT NULL,
12+
created_by integer NOT NULL,
13+
updated_by integer NOT NULL
14+
);
15+
16+
17+
ALTER TABLE public.project_management_tool_config OWNER TO postgres;
18+
19+
--
20+
-- Name: project_management_tool_config_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
21+
--
22+
23+
CREATE SEQUENCE public.project_management_tool_config_id_seq
24+
AS integer
25+
START WITH 1
26+
INCREMENT BY 1
27+
NO MINVALUE
28+
NO MAXVALUE
29+
CACHE 1;
30+
31+
32+
ALTER TABLE public.project_management_tool_config_id_seq OWNER TO postgres;
33+
34+
--
35+
-- Name: project_management_tool_config_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
36+
--
37+
38+
ALTER SEQUENCE public.project_management_tool_config_id_seq OWNED BY public.project_management_tool_config.id;
39+
40+
--
41+
-- Name: db_config; Type: TABLE; Schema: public; Owner: postgres
42+
--
43+
44+
CREATE TABLE public.db_config (
45+
id integer NOT NULL,
46+
name character varying(250) NOT NULL,
47+
type character varying(250) NOT NULL,
48+
host character varying(250) NOT NULL,
49+
port character varying(250) NOT NULL,
50+
db_name character varying(250) NOT NULL,
51+
user_name character varying(250) NOT NULL,
52+
password character varying(250) NOT NULL,
53+
active boolean NOT NULL,
54+
created_on timestamp with time zone NOT NULL,
55+
created_by integer NOT NULL,
56+
updated_on timestamp with time zone NOT NULL,
57+
updated_by integer NOT NULL
58+
);
59+
60+
61+
ALTER TABLE public.db_config OWNER TO postgres;
62+
63+
--
64+
-- Name: db_config_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
65+
--
66+
67+
CREATE SEQUENCE public.db_config_id_seq
68+
AS integer
69+
START WITH 1
70+
INCREMENT BY 1
71+
NO MINVALUE
72+
NO MAXVALUE
73+
CACHE 1;
74+
75+
76+
ALTER TABLE public.db_config_id_seq OWNER TO postgres;
77+
78+
--
79+
-- Name: db_config_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
80+
--
81+
82+
ALTER SEQUENCE public.db_config_id_seq OWNED BY public.db_config.id;
83+
84+
85+
--
86+
-- Name: db_migration_config; Type: TABLE; Schema: public; Owner: postgres
87+
--
88+
89+
CREATE TABLE public.db_migration_config (
90+
id integer NOT NULL,
91+
db_config_id integer NOT NULL,
92+
pipeline_id integer NOT NULL,
93+
git_material_id integer NOT NULL,
94+
script_source character varying(250) NOT NULL,
95+
migration_tool character varying(250) NOT NULL,
96+
active boolean NOT NULL,
97+
created_on timestamp with time zone NOT NULL,
98+
created_by integer NOT NULL,
99+
updated_on timestamp with time zone NOT NULL,
100+
updated_by integer NOT NULL
101+
);
102+
103+
104+
ALTER TABLE public.db_migration_config OWNER TO postgres;
105+
106+
--
107+
-- Name: db_migration_config_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
108+
--
109+
110+
CREATE SEQUENCE public.db_migration_config_id_seq
111+
AS integer
112+
START WITH 1
113+
INCREMENT BY 1
114+
NO MINVALUE
115+
NO MAXVALUE
116+
CACHE 1;
117+
118+
119+
ALTER TABLE public.db_migration_config_id_seq OWNER TO postgres;
120+
121+
--
122+
-- Name: db_migration_config_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
123+
--
124+
125+
ALTER SEQUENCE public.db_migration_config_id_seq OWNED BY public.db_migration_config.id;

0 commit comments

Comments
 (0)