From ae2d6e3dca949d493e6c07567dc5114042414e02 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Tue, 28 Mar 2023 00:20:14 +0900
Subject: Drop kakeibo.update_timestamp.

---
 revert/update_timestamp.sql | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'revert/update_timestamp.sql')

diff --git a/revert/update_timestamp.sql b/revert/update_timestamp.sql
index 30f9c6d..eac2a44 100644
--- a/revert/update_timestamp.sql
+++ b/revert/update_timestamp.sql
@@ -3,7 +3,13 @@
 
 BEGIN;
 
-DROP FUNCTION common.update_timestamp();
+CREATE OR REPLACE FUNCTION common.update_timestamp() RETURNS TRIGGER AS $$
+  BEGIN
+    NEW.updated_at = NOW();
+    RETURN NEW;
+  END;
+$$ LANGUAGE plpgsql;
+
 CREATE OR REPLACE FUNCTION kakeibo.update_timestamp() RETURNS TRIGGER AS $$
   BEGIN
     NEW.updated_at = NOW();
@@ -11,4 +17,5 @@ CREATE OR REPLACE FUNCTION kakeibo.update_timestamp() RETURNS TRIGGER AS $$
   END;
 $$ LANGUAGE plpgsql;
 
+
 COMMIT;
-- 
cgit v1.2.3

