diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-10-29 15:33:39 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-03 15:58:55 +0100 |
commit | 19ac840760f7f0d703cc50da8b3b0fdd88d5913f (patch) | |
tree | 7b93c74940a33fba1f441b191d7ce0a7042fa176 /migrations/2020-10-29-142443_create_jobs | |
parent | 5ef71187792cb05c2834f8ff104b1ebd0c5c00b0 (diff) |
Add migrations for creating all tables
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'migrations/2020-10-29-142443_create_jobs')
-rw-r--r-- | migrations/2020-10-29-142443_create_jobs/down.sql | 2 | ||||
-rw-r--r-- | migrations/2020-10-29-142443_create_jobs/up.sql | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/migrations/2020-10-29-142443_create_jobs/down.sql b/migrations/2020-10-29-142443_create_jobs/down.sql new file mode 100644 index 0000000..b54a154 --- /dev/null +++ b/migrations/2020-10-29-142443_create_jobs/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +DROP TABLE jobs diff --git a/migrations/2020-10-29-142443_create_jobs/up.sql b/migrations/2020-10-29-142443_create_jobs/up.sql new file mode 100644 index 0000000..0ee6d6b --- /dev/null +++ b/migrations/2020-10-29-142443_create_jobs/up.sql @@ -0,0 +1,14 @@ +-- Your SQL goes here +CREATE TABLE jobs ( + id SERIAL PRIMARY KEY NOT NULL, + + submit_id INTEGER REFERENCES submits(id) NOT NULL, + endpoint_id INTEGER REFERENCES endpoints(id) NOT NULL, + package_id INTEGER REFERENCES packages(id) NOT NULL, + image_id INTEGER REFERENCES images(id) NOT NULL, + artifact_id INTEGER REFERENCES artifacts(id) NOT NULL, + + container_hash VARCHAR NOT NULL, + script_text TEXT NOT NULL, + log_text TEXT NOT NULL +) |