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

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

(limited to 'verify/photos_update_timestamp.sql')

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

