From 245f705e51429a7cd152039ca2b3b6b63c619464 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Tue, 28 Mar 2023 00:14:44 +0900
Subject: Change kakeibo.update_timestamp to common.update_timestamp.

---
 revert/transactions_update_timestamp.sql | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'revert/transactions_update_timestamp.sql')

diff --git a/revert/transactions_update_timestamp.sql b/revert/transactions_update_timestamp.sql
index c9bee8f..23c126a 100644
--- a/revert/transactions_update_timestamp.sql
+++ b/revert/transactions_update_timestamp.sql
@@ -1,7 +1,12 @@
--- Revert kakeibo:transactions_update_timestamp from pg
+-- Deploy kakeibo:transactions_update_timestamp to pg
+-- requires: transactions
+-- requires: update_timestamp
 
 BEGIN;
 
-DROP TRIGGER update_timestamp ON kakeibo.transactions;
+CREATE OR REPLACE TRIGGER update_timestamp
+  BEFORE UPDATE ON kakeibo.transactions
+  FOR EACH ROW
+  EXECUTE FUNCTION kakeibo.update_timestamp();
 
 COMMIT;
-- 
cgit v1.2.3

