From 6fcbad753b6b513f74fa15c252d752f30491e519 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Sat, 16 Mar 2024 03:07:05 +0900
Subject: Add table to link articles.

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

(limited to 'deploy/article_links.sql')

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

