From d7f08e2a280436cb89e83575f10e0adb52a9c53e Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Wed, 30 Aug 2023 01:00:17 +0900
Subject: Add update_timestamp trigger to diaries table

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

(limited to 'verify/diaries_update_timestamp.sql')

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

