From 3750a87a1b21ebb169d0bdb70833a85d7f20c6b1 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Wed, 1 Mar 2023 02:07:26 +0900
Subject: Add update_timestamp trigger to items table.

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

(limited to 'verify/items_update_timestamp.sql')

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

