Skip to content

Commit 79e2328

Browse files
committed
migration update for remote connection config
1 parent 3f8a211 commit 79e2328

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DROP TABLE remote_connection_config;
2+
ALTER TABLE cluster DROP COLUMN remote_connection_config_id;
3+
ALTER TABLE docker_artifact_store DROP COLUMN remote_connection_config_id;
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
ALTER TABLE cluster ADD COLUMN remote_connection_config_id INT;
2+
ALTER TABLE docker_artifact_store ADD COLUMN remote_connection_config_id INT;
3+
4+
CREATE SEQUENCE IF NOT EXISTS id_seq_remote_connection_config;
5+
CREATE TABLE IF NOT EXISTS public.remote_connection_config
6+
(
7+
"id" int NOT NULL DEFAULT nextval('id_seq_remote_connection_config'::regclass),
8+
"connection_method"
9+
VARCHAR(50) NOT NULL,
10+
"proxy_url" VARCHAR(300) ,
11+
"ssh_server_address" VARCHAR(300),
12+
"ssh_username" VARCHAR(300),
13+
"ssh_password" text,
14+
"ssh_auth_key" text,
15+
"deleted" bool NOT NULL,
16+
"created_on" timestamptz NOT NULL,
17+
"created_by" int4 NOT NULL,
18+
"updated_on" timestamptz NOT NULL,
19+
"updated_by" int4 NOT NULL,
20+
PRIMARY KEY ("id")
21+
);
22+
23+
ALTER TABLE cluster
24+
ADD CONSTRAINT fk_cluster_remote_connection_config
25+
FOREIGN KEY (remote_connection_config_id)
26+
REFERENCES remote_connection_config (id);
27+
28+
ALTER TABLE docker_artifact_store
29+
ADD CONSTRAINT fk_docker_artifact_store_remote_connection_config
30+
FOREIGN KEY (remote_connection_config_id)
31+
REFERENCES remote_connection_config (id);
32+

0 commit comments

Comments
 (0)