summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-12-03 09:47:20 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-12-03 09:47:20 +0100
commitd7667a7aab2ffae5934292b16167f66a80bb9439 (patch)
tree3e742fa930c1f5b3e1fc2e22d7eca3e063e848fd
parentbc61eb15068ebc34e60a5dee144d0912794dc3e1 (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.sql5
-rw-r--r--migrations/2020-12-03-084509_artifact_release_flag/up.sql5
-rw-r--r--src/db/models/artifact.rs1
-rw-r--r--src/schema.rs1
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,
}
}