From 3750a87a1b21ebb169d0bdb70833a85d7f20c6b1 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Wed, 1 Mar 2023 02:07:26 +0900 Subject: Add update_timestamp trigger to items table. --- deploy/items_update_timestamp.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 deploy/items_update_timestamp.sql (limited to 'deploy') diff --git a/deploy/items_update_timestamp.sql b/deploy/items_update_timestamp.sql new file mode 100644 index 0000000..31bb84c --- /dev/null +++ b/deploy/items_update_timestamp.sql @@ -0,0 +1,12 @@ +-- Deploy kakeibo:items_update_timestamp to pg +-- requires: items +-- requires: update_timestamp + +BEGIN; + +CREATE OR REPLACE TRIGGER update_timestamp + BEFORE UPDATE ON kakeibo.items + FOR EACH ROW + EXECUTE FUNCTION kakeibo.update_timestamp(); + +COMMIT; -- cgit v1.2.3