From b121761eb44b8fd8a8aee4e0945f6a7dcec9c719 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Sun, 5 Mar 2023 23:35:09 +0900
Subject: Add article_id column to items table.

---
 deploy/items_article_id.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 deploy/items_article_id.sql

(limited to 'deploy/items_article_id.sql')

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;
-- 
cgit v1.2.3

