aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2024-03-16 03:07:05 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2024-03-16 03:07:05 +0900
commit6fcbad753b6b513f74fa15c252d752f30491e519 (patch)
treeeb07310403b2a9dd948d0645de33af372cdd0bea /deploy
parent2fb413587fc1d34045a8724b0aac60e8e8051560 (diff)
Add table to link articles.
Diffstat (limited to 'deploy')
-rw-r--r--deploy/article_links.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/deploy/article_links.sql b/deploy/article_links.sql
new file mode 100644
index 0000000..622076e
--- /dev/null
+++ b/deploy/article_links.sql
@@ -0,0 +1,16 @@
+-- Deploy diary:article_links to pg
+-- requires: schema
+-- requires: articles
+
+BEGIN;
+
+SET search_path to diary;
+
+CREATE TABLE article_links(
+ article_id UUID REFERENCES articles(id),
+ linked_article_id UUID REFERENCES articles(id),
+ PRIMARY KEY(article_id, linked_article_id)
+);
+
+
+COMMIT;