diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2023-03-13 00:40:35 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2023-03-14 09:09:58 +0900 |
commit | 8133c9e74bf846d275355cc5690b5a465d0372b8 (patch) | |
tree | 33d4dbba7f2383e01d9c86d7473dcc252247de55 /verify | |
parent | f011f99514c304521e14eb00b2c6e6d4b2c3dd11 (diff) |
Add update_timestamp trigger to articles table.
Diffstat (limited to 'verify')
-rw-r--r-- | verify/articles_update_timestamp.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/verify/articles_update_timestamp.sql b/verify/articles_update_timestamp.sql new file mode 100644 index 0000000..f1952b3 --- /dev/null +++ b/verify/articles_update_timestamp.sql @@ -0,0 +1,14 @@ +-- Verify kakeibo:articles_update_timestamp on pg + +BEGIN; + +DO $$ + BEGIN + ASSERT (SELECT 1 from information_schema.triggers + WHERE trigger_schema = 'kakeibo' + AND event_object_table = 'articles' + AND trigger_name = 'update_timestamp'); + END +$$; + +ROLLBACK; |