diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2023-03-06 02:04:29 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2023-03-06 02:04:29 +0900 |
commit | 79c9bd6a059050bfcaf879b1854550ccffaa4d15 (patch) | |
tree | fd8fe07ed547a40922f335ba1fbaab5471fd4e5a /verify | |
parent | b121761eb44b8fd8a8aee4e0945f6a7dcec9c719 (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; |