diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2024-03-16 03:07:05 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2024-03-16 03:07:05 +0900 |
commit | 6fcbad753b6b513f74fa15c252d752f30491e519 (patch) | |
tree | eb07310403b2a9dd948d0645de33af372cdd0bea /deploy | |
parent | 2fb413587fc1d34045a8724b0aac60e8e8051560 (diff) |
Add table to link articles.
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/article_links.sql | 16 |
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; |