From eaee68ba5ffed646f51779e829163dc339d602a7 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Thu, 31 Aug 2023 00:40:54 +0900 Subject: Add update_timestamp trigger to transactions table --- deploy/transactions_update_timestamp.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 deploy/transactions_update_timestamp.sql (limited to 'deploy') diff --git a/deploy/transactions_update_timestamp.sql b/deploy/transactions_update_timestamp.sql new file mode 100644 index 0000000..e893986 --- /dev/null +++ b/deploy/transactions_update_timestamp.sql @@ -0,0 +1,15 @@ +-- Deploy photos:transactions_update_timestamp to pg +-- requires: schema +-- requires: transactions +-- requires: update_timestamp + +BEGIN; + +SET search_path to photos; + +CREATE OR REPLACE TRIGGER update_timestamp + BEFORE UPDATE ON transactions + FOR EACH ROW + EXECUTE FUNCTION update_timestamp(); + +COMMIT; -- cgit v1.2.3