From 3f999d647e972e4f7fd807832bc4544f7aaecede Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Sun, 5 Mar 2023 23:31:51 +0900 Subject: Add article_id column to transactions table. --- deploy/transactions_article_id.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 deploy/transactions_article_id.sql (limited to 'deploy') diff --git a/deploy/transactions_article_id.sql b/deploy/transactions_article_id.sql new file mode 100644 index 0000000..fbcae41 --- /dev/null +++ b/deploy/transactions_article_id.sql @@ -0,0 +1,11 @@ +-- Deploy kakeibo:transactions_article_id to pg +-- requires: transactions +-- requires: articles + +BEGIN; + +ALTER TABLE kakeibo.transactions + ADD COLUMN article_id INTEGER, + ADD CONSTRAINT transactions_article_id_fkey FOREIGN KEY (article_id) REFERENCES kakeibo.articles (id); + +COMMIT; -- cgit v1.2.3