Skip to content

Commit df2e346

Browse files
committed
Add tms_test_plan >-< launch relationship
1 parent 7e1c575 commit df2e346

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

migrations/103_tms_initial.down.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ DROP TABLE IF EXISTS tms_test_plan_test_case;
3737
DROP TABLE IF EXISTS tms_test_case;
3838
DROP TABLE IF EXISTS tms_test_folder;
3939
DROP TABLE IF EXISTS tms_milestone;
40+
DROP TABLE IF EXISTS tms_test_plan_launch;
4041
DROP TABLE IF EXISTS tms_test_plan;
4142
DROP TABLE IF EXISTS tms_environment_dataset;
4243
DROP TABLE IF EXISTS tms_environment;

migrations/103_tms_initial.up.sql

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,18 @@ CREATE TABLE tms_test_plan
7777
REFERENCES tms_environment,
7878
product_version_id bigint
7979
CONSTRAINT tms_test_plan_fk_product_version
80-
REFERENCES tms_product_version,
81-
launch_id bigint UNIQUE
82-
CONSTRAINT tms_test_plan_fk_launch
83-
REFERENCES launch
80+
REFERENCES tms_product_version
81+
);
82+
83+
CREATE TABLE tms_test_plan_launch
84+
(
85+
test_plan_id bigint
86+
CONSTRAINT tms_test_plan_launch_fk_test_plan
87+
REFERENCES tms_test_plan,
88+
launch_id bigint
89+
CONSTRAINT tms_test_plan_launch_fk_launch
90+
REFERENCES launch,
91+
PRIMARY KEY (test_plan_id, launch_id)
8492
);
8593

8694
CREATE TABLE tms_milestone

0 commit comments

Comments
 (0)