From 8133c9e74bf846d275355cc5690b5a465d0372b8 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Mon, 13 Mar 2023 00:40:35 +0900
Subject: Add update_timestamp trigger to articles table.

---
 verify/articles_update_timestamp.sql | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 verify/articles_update_timestamp.sql

(limited to 'verify/articles_update_timestamp.sql')

diff --git a/verify/articles_update_timestamp.sql b/verify/articles_update_timestamp.sql
new file mode 100644
index 0000000..f1952b3
--- /dev/null
+++ b/verify/articles_update_timestamp.sql
@@ -0,0 +1,14 @@
+-- Verify kakeibo:articles_update_timestamp on pg
+
+BEGIN;
+
+DO $$
+  BEGIN
+    ASSERT (SELECT 1 from information_schema.triggers
+             WHERE trigger_schema = 'kakeibo'
+               AND event_object_table = 'articles'
+               AND trigger_name = 'update_timestamp');
+  END
+$$;
+
+ROLLBACK;
-- 
cgit v1.2.3

