aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2024-03-13 00:56:38 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2024-03-13 00:57:08 +0900
commita927b30705d1e8c6b1b046e7512cc67cbdf19a21 (patch)
tree4a055da04aceac1a894ad2866f2e312669da359c /deploy
parent59e39e0088fc71225a0d5b4b1ca7df6ec9ec4659 (diff)
Remove update_updated_at functions.
Diffstat (limited to 'deploy')
-rw-r--r--deploy/articles_update_updated_at.sql15
-rw-r--r--deploy/tags_update_updated_at.sql15
-rw-r--r--deploy/update_updated_at.sql15
3 files changed, 0 insertions, 45 deletions
diff --git a/deploy/articles_update_updated_at.sql b/deploy/articles_update_updated_at.sql
deleted file mode 100644
index 31b7ccd..0000000
--- a/deploy/articles_update_updated_at.sql
+++ /dev/null
@@ -1,15 +0,0 @@
--- Deploy diary:articles_update_updated_at to pg
--- requires: schema
--- requires: articles
--- requires: update_updated_at
-
-BEGIN;
-
-SET search_path to diary;
-
-CREATE OR REPLACE TRIGGER update_updated_at
- BEFORE UPDATE ON articles
- FOR EACH ROW
- EXECUTE FUNCTION update_updated_at();
-
-COMMIT;
diff --git a/deploy/tags_update_updated_at.sql b/deploy/tags_update_updated_at.sql
deleted file mode 100644
index 42e860b..0000000
--- a/deploy/tags_update_updated_at.sql
+++ /dev/null
@@ -1,15 +0,0 @@
--- Deploy diary:tags_update_updated_at to pg
--- requires: schema
--- requires: tags
--- requires: update_updated_at
-
-BEGIN;
-
-SET search_path to diary;
-
-CREATE OR REPLACE TRIGGER update_updated_at
- BEFORE UPDATE ON tags
- FOR EACH ROW
- EXECUTE FUNCTION update_updated_at();
-
-COMMIT;
diff --git a/deploy/update_updated_at.sql b/deploy/update_updated_at.sql
deleted file mode 100644
index a41d27f..0000000
--- a/deploy/update_updated_at.sql
+++ /dev/null
@@ -1,15 +0,0 @@
--- Deploy diary:update_updated_at to pg
--- requires: schema
-
-BEGIN;
-
-SET search_path to diary;
-
-CREATE OR REPLACE FUNCTION update_updated_at() RETURNS TRIGGER AS $$
- BEGIN
- NEW.updated_at = NOW();
- RETURN NEW;
- END;
-$$ LANGUAGE plpgsql;
-
-COMMIT;