From 2fb413587fc1d34045a8724b0aac60e8e8051560 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Sat, 16 Mar 2024 03:02:02 +0900
Subject: Add table for tagging articles.

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

(limited to 'deploy/article_taggings.sql')

diff --git a/deploy/article_taggings.sql b/deploy/article_taggings.sql
new file mode 100644
index 0000000..3985543
--- /dev/null
+++ b/deploy/article_taggings.sql
@@ -0,0 +1,16 @@
+-- Deploy diary:article_taggings to pg
+-- requires: schema
+-- requires: tags
+-- requires: articles
+
+BEGIN;
+
+SET search_path to diary;
+
+CREATE TABLE article_taggings(
+  article_id UUID REFERENCES articles(id),
+  tag_id INT REFERENCES tags(id),
+  PRIMARY KEY(article_id, tag_id)
+);
+
+COMMIT;
-- 
cgit v1.2.3

