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@v1.0.0-alpha.3.sql | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 revert/update_timestamp@v1.0.0-alpha.3.sql

(limited to 'revert/update_timestamp@v1.0.0-alpha.3.sql')

diff --git a/revert/update_timestamp@v1.0.0-alpha.3.sql b/revert/update_timestamp@v1.0.0-alpha.3.sql
new file mode 100644
index 0000000..30f9c6d
--- /dev/null
+++ b/revert/update_timestamp@v1.0.0-alpha.3.sql
@@ -0,0 +1,14 @@
+-- Deploy kakeibo:update_timestamp to pg
+-- requires: schema
+
+BEGIN;
+
+DROP FUNCTION common.update_timestamp();
+CREATE OR REPLACE FUNCTION kakeibo.update_timestamp() RETURNS TRIGGER AS $$
+  BEGIN
+    NEW.updated_at = NOW();
+    RETURN NEW;
+  END;
+$$ LANGUAGE plpgsql;
+
+COMMIT;
-- 
cgit v1.2.3

