aboutsummaryrefslogtreecommitdiff
path: root/revert/items_update_timestamp.sql
diff options
context:
space:
mode:
Diffstat (limited to 'revert/items_update_timestamp.sql')
-rw-r--r--revert/items_update_timestamp.sql9
1 files changed, 7 insertions, 2 deletions
diff --git a/revert/items_update_timestamp.sql b/revert/items_update_timestamp.sql
index 52ce12f..f9258b2 100644
--- a/revert/items_update_timestamp.sql
+++ b/revert/items_update_timestamp.sql
@@ -1,7 +1,12 @@
--- Revert kakeibo:items_update_timestamp from pg
+-- Deploy kakeibo:items_update_timestamp to pg
+-- requires: items
+-- requires: update_timestamp
BEGIN;
-DROP TRIGGER update_timestamp ON kakeibo.items;
+CREATE OR REPLACE TRIGGER update_timestamp
+ BEFORE UPDATE ON kakeibo.items
+ FOR EACH ROW
+ EXECUTE FUNCTION kakeibo.update_timestamp();
COMMIT;