aboutsummaryrefslogtreecommitdiff
path: root/deploy/items_article_id.sql
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/items_article_id.sql')
-rw-r--r--deploy/items_article_id.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/deploy/items_article_id.sql b/deploy/items_article_id.sql
new file mode 100644
index 0000000..4bb33ad
--- /dev/null
+++ b/deploy/items_article_id.sql
@@ -0,0 +1,11 @@
+-- Deploy kakeibo:items_article_id to pg
+-- requires: items
+-- requires: articles
+
+BEGIN;
+
+ALTER TABLE kakeibo.items
+ ADD COLUMN article_id INTEGER,
+ ADD CONSTRAINT items_article_id_fkey FOREIGN KEY (article_id) REFERENCES kakeibo.articles (id);
+
+COMMIT;