diff options
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(); |