aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deploy/article_links.sql4
-rw-r--r--deploy/article_taggings.sql4
-rw-r--r--deploy/articles.sql2
-rw-r--r--deploy/tags.sql2
-rw-r--r--verify/articles.sql2
-rw-r--r--verify/tags.sql2
6 files changed, 8 insertions, 8 deletions
diff --git a/deploy/article_links.sql b/deploy/article_links.sql
index b562ffc..c39c814 100644
--- a/deploy/article_links.sql
+++ b/deploy/article_links.sql
@@ -7,8 +7,8 @@ BEGIN;
SET search_path to diary;
CREATE TABLE article_links(
- article_id UUID REFERENCES articles(id),
- linked_article_id UUID REFERENCES articles(id),
+ article_id UUID REFERENCES articles,
+ linked_article_id UUID REFERENCES articles(article_id),
PRIMARY KEY(article_id, linked_article_id)
);
diff --git a/deploy/article_taggings.sql b/deploy/article_taggings.sql
index 3985543..0719c8f 100644
--- a/deploy/article_taggings.sql
+++ b/deploy/article_taggings.sql
@@ -8,8 +8,8 @@ BEGIN;
SET search_path to diary;
CREATE TABLE article_taggings(
- article_id UUID REFERENCES articles(id),
- tag_id INT REFERENCES tags(id),
+ article_id UUID REFERENCES articles,
+ tag_id INT REFERENCES tags,
PRIMARY KEY(article_id, tag_id)
);
diff --git a/deploy/articles.sql b/deploy/articles.sql
index 6b2ca49..62505ce 100644
--- a/deploy/articles.sql
+++ b/deploy/articles.sql
@@ -6,7 +6,7 @@ BEGIN;
SET search_path to diary;
CREATE TABLE articles(
- id UUID PRIMARY KEY,
+ article_id UUID PRIMARY KEY,
timestamp TIMESTAMPTZ NOT NULL,
hash VARCHAR(64) NOT NULL,
title TEXT NOT NULL,
diff --git a/deploy/tags.sql b/deploy/tags.sql
index 3bee8ed..82a550a 100644
--- a/deploy/tags.sql
+++ b/deploy/tags.sql
@@ -6,7 +6,7 @@ BEGIN;
SET search_path to diary;
CREATE TABLE tags(
- id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
+ tag_id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
name varchar UNIQUE NOT NULL
);
diff --git a/verify/articles.sql b/verify/articles.sql
index 56526d7..4b98547 100644
--- a/verify/articles.sql
+++ b/verify/articles.sql
@@ -4,7 +4,7 @@ BEGIN;
SET search_path to diary;
-SELECT id, timestamp, hash, title, body
+SELECT article_id, timestamp, hash, title, body
FROM articles
WHERE FALSE;
diff --git a/verify/tags.sql b/verify/tags.sql
index faaec73..86321d3 100644
--- a/verify/tags.sql
+++ b/verify/tags.sql
@@ -4,7 +4,7 @@ BEGIN;
SET search_path to diary;
-SELECT id, name
+SELECT tag_id, name
FROM tags
WHERE FALSE;