Skip to content

Commit

Permalink
database: Simplify before update trigger for the crates table
Browse files Browse the repository at this point in the history
We no longer need to filter out updates to the `downloads` columns since that column is no longer being written to and will be removed in a follow-up commit.
  • Loading branch information
Turbo87 committed Mar 6, 2024
1 parent 4af300e commit 19c54b7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
drop trigger trigger_crates_set_updated_at
on crates;

create trigger trigger_crates_set_updated_at
before update
on crates
for each row
execute procedure set_updated_at_ignore_downloads();

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
drop trigger trigger_crates_set_updated_at
on crates;

create trigger trigger_crates_set_updated_at
before update
on crates
for each row
execute procedure set_updated_at();

0 comments on commit 19c54b7

Please sign in to comment.