aboutsummaryrefslogtreecommitdiff
path: root/deploy/article_links.sql
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/article_links.sql')
-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;