summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,
}
}