From a9c3438a20e7eccfdd31414c2c71092ddda8f705 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Sun, 12 Mar 2023 23:13:31 +0900
Subject: Add update_timestamp trigger to transactions table.

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

(limited to 'verify/transactions_update_timestamp.sql')

diff --git a/verify/transactions_update_timestamp.sql b/verify/transactions_update_timestamp.sql
new file mode 100644
index 0000000..50f348e
--- /dev/null
+++ b/verify/transactions_update_timestamp.sql
@@ -0,0 +1,14 @@
+-- Verify kakeibo:transactions_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

