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/articles_update_timestamp.sql | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'revert/articles_update_timestamp.sql')

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

