From a4a99033f2d3eb7e6d03387fe7e6618604885776 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Sun, 12 Mar 2023 23:16:42 +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..c7fe432
--- /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 = 'transactions'
+               AND trigger_name = 'update_timestamp');
+  END
+$$;
+
+ROLLBACK;
-- 
cgit v1.2.3

