diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2024-03-11 01:09:12 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2024-03-11 01:09:12 +0900 |
commit | 1fd13d3895ba1274c1754379b3003b1e4f9840ab (patch) | |
tree | f62cac581bd047dd1e951da1b6a1f8adf08c9c39 /verify | |
parent | 8fdc5179b1d5ba075c74f28337f1c83e28240ed2 (diff) |
Add update_updated_at trigger to article_tags table.
Diffstat (limited to 'verify')
-rw-r--r-- | verify/article_tags_update_updated_at.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/verify/article_tags_update_updated_at.sql b/verify/article_tags_update_updated_at.sql new file mode 100644 index 0000000..7ee95db --- /dev/null +++ b/verify/article_tags_update_updated_at.sql @@ -0,0 +1,14 @@ +-- Verify diary:article_tags_update_updated_at on pg + +BEGIN; + +DO $$ + BEGIN + ASSERT (SELECT 1 from information_schema.triggers + WHERE trigger_schema = 'diary' + AND event_object_table = 'article_tags' + AND trigger_name = 'update_updated_at'); + END +$$; + +ROLLBACK; |