aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2024-03-12 02:52:57 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2024-03-12 02:52:57 +0900
commit59e39e0088fc71225a0d5b4b1ca7df6ec9ec4659 (patch)
tree900227533d65e277b408df911cc7df446edaff16 /deploy
parent1fd13d3895ba1274c1754379b3003b1e4f9840ab (diff)
Rename article_tags to tags.
Diffstat (limited to 'deploy')
-rw-r--r--deploy/tags.sql (renamed from deploy/article_tags.sql)4
-rw-r--r--deploy/tags_update_updated_at.sql (renamed from deploy/article_tags_update_updated_at.sql)6
2 files changed, 5 insertions, 5 deletions
diff --git a/deploy/article_tags.sql b/deploy/tags.sql
index 617dcdc..8186248 100644
--- a/deploy/article_tags.sql
+++ b/deploy/tags.sql
@@ -1,11 +1,11 @@
--- Deploy diary:article_tags to pg
+-- Deploy diary:tags to pg
-- requires: schema
BEGIN;
SET search_path to diary;
-CREATE TABLE article_tags(
+CREATE TABLE tags(
id UUID PRIMARY KEY,
name TEXT UNIQUE NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
diff --git a/deploy/article_tags_update_updated_at.sql b/deploy/tags_update_updated_at.sql
index 20d3bc7..42e860b 100644
--- a/deploy/article_tags_update_updated_at.sql
+++ b/deploy/tags_update_updated_at.sql
@@ -1,6 +1,6 @@
--- Deploy diary:article_tags_update_updated_at to pg
+-- Deploy diary:tags_update_updated_at to pg
-- requires: schema
--- requires: article_tags
+-- requires: tags
-- requires: update_updated_at
BEGIN;
@@ -8,7 +8,7 @@ BEGIN;
SET search_path to diary;
CREATE OR REPLACE TRIGGER update_updated_at
- BEFORE UPDATE ON article_tags
+ BEFORE UPDATE ON tags
FOR EACH ROW
EXECUTE FUNCTION update_updated_at();