diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-11-11 12:13:01 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-11 12:17:17 +0100 |
commit | c1ef0e4be3374ca2048b503a2d4ed407d1edef59 (patch) | |
tree | 78d4c120cb1168c2b0cbe0f72030f18b9fa0c738 /migrations | |
parent | 26238e78983e89c06503580da1282b755ff3928d (diff) |
Create migrations for job output artifacts
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/2020-11-11-111013_job_output_artifacts/down.sql | 2 | ||||
-rw-r--r-- | migrations/2020-11-11-111013_job_output_artifacts/up.sql | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/migrations/2020-11-11-111013_job_output_artifacts/down.sql b/migrations/2020-11-11-111013_job_output_artifacts/down.sql new file mode 100644 index 0000000..5a6c527 --- /dev/null +++ b/migrations/2020-11-11-111013_job_output_artifacts/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +DROP TABLE job_output_artifacts diff --git a/migrations/2020-11-11-111013_job_output_artifacts/up.sql b/migrations/2020-11-11-111013_job_output_artifacts/up.sql new file mode 100644 index 0000000..84b0a44 --- /dev/null +++ b/migrations/2020-11-11-111013_job_output_artifacts/up.sql @@ -0,0 +1,8 @@ +-- Your SQL goes here +CREATE TABLE job_output_artifacts ( + id SERIAL PRIMARY KEY NOT NULL, + job_id INTEGER REFERENCES jobs(id) NOT NULL, + artifact_id INTEGER REFERENCES artifacts(id) NOT NULL, + + CONSTRAINT UC_jobid_output_artifactid UNIQUE (job_id, artifact_id) +) |