diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2023-08-30 00:19:17 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2023-10-13 02:12:48 +0900 |
commit | b6d633011163002c2923f3809cd5ead2c53e2aa3 (patch) | |
tree | 292cdcf7a5ca96b059c6dd7b751104e48f11cef3 /verify | |
parent | 6d6f4546b0cda266e6f5e6f2cda783da985dfb00 (diff) |
Add update_timestamp trigger to photos table
Diffstat (limited to 'verify')
-rw-r--r-- | verify/photos_update_timestamp.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/verify/photos_update_timestamp.sql b/verify/photos_update_timestamp.sql new file mode 100644 index 0000000..92aaa87 --- /dev/null +++ b/verify/photos_update_timestamp.sql @@ -0,0 +1,14 @@ +-- Verify photos:photos_update_timestamp on pg + +BEGIN; + +DO $$ + BEGIN + ASSERT (SELECT 1 from information_schema.triggers + WHERE trigger_schema = 'photos' + AND event_object_table = 'photos' + AND trigger_name = 'update_timestamp'); + END +$$; + +ROLLBACK; |