diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-03 09:47:20 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-03 09:47:20 +0100 |
commit | d7667a7aab2ffae5934292b16167f66a80bb9439 (patch) | |
tree | 3e742fa930c1f5b3e1fc2e22d7eca3e063e848fd | |
parent | bc61eb15068ebc34e60a5dee144d0912794dc3e1 (diff) |
Add flag to artifacts table, whether artifact is released or not
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | migrations/2020-12-03-084509_artifact_release_flag/down.sql | 5 | ||||
-rw-r--r-- | migrations/2020-12-03-084509_artifact_release_flag/up.sql | 5 | ||||
-rw-r--r-- | src/db/models/artifact.rs | 1 | ||||
-rw-r--r-- | src/schema.rs | 1 |
4 files changed, 12 insertions, 0 deletions
diff --git a/migrations/2020-12-03-084509_artifact_release_flag/down.sql b/migrations/2020-12-03-084509_artifact_release_flag/down.sql new file mode 100644 index 0000000..9d0ace1 --- /dev/null +++ b/migrations/2020-12-03-084509_artifact_release_flag/down.sql @@ -0,0 +1,5 @@ +-- This file should undo anything in `up.sql` +ALTER TABLE + artifacts +DROP COLUMN + released diff --git a/migrations/2020-12-03-084509_artifact_release_flag/up.sql b/migrations/2020-12-03-084509_artifact_release_flag/up.sql new file mode 100644 index 0000000..0c45567 --- /dev/null +++ b/migrations/2020-12-03-084509_artifact_release_flag/up.sql @@ -0,0 +1,5 @@ +-- Your SQL goes here +ALTER TABLE + artifacts +ADD COLUMN + released boolean NOT NULL diff --git a/src/db/models/artifact.rs b/src/db/models/artifact.rs index a92a9bd..92b6531 100644 --- a/src/db/models/artifact.rs +++ b/src/db/models/artifact.rs @@ -2,5 +2,6 @@ pub struct Artifact { pub id: i32, pub path: String, + pub released: bool, } diff --git a/src/schema.rs b/src/schema.rs index aa777a6..3b7c4d4 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -2,6 +2,7 @@ table! { artifacts (id) { id -> Int4, path -> Varchar, + released -> Bool, } } |