aboutsummaryrefslogtreecommitdiff
path: root/verify
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2024-03-11 00:31:23 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2024-03-11 00:31:23 +0900
commit62ce03796ba8e43277ba3f5acbf55cfb76591416 (patch)
tree0be5df767ba8b13b44c1e5993b1e83abe6f1a63d /verify
parent5039f9a506222b3f74312a4586166f5130e53817 (diff)
Add update_updated_at trigger to articles table.
Diffstat (limited to 'verify')
-rw-r--r--verify/articles_update_updated_at.sql14
1 files changed, 14 insertions, 0 deletions
diff --git a/verify/articles_update_updated_at.sql b/verify/articles_update_updated_at.sql
new file mode 100644
index 0000000..744b1fd
--- /dev/null
+++ b/verify/articles_update_updated_at.sql
@@ -0,0 +1,14 @@
+-- Verify diary:articles_update_updated_at on pg
+
+BEGIN;
+
+DO $$
+ BEGIN
+ ASSERT (SELECT 1 from information_schema.triggers
+ WHERE trigger_schema = 'diary'
+ AND event_object_table = 'articles'
+ AND trigger_name = 'update_updated_at');
+ END
+$$;
+
+ROLLBACK;