diff options
author | Yorhel <git@yorhel.nl> | 2020-04-16 09:22:09 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-04-16 09:22:13 +0200 |
commit | 074d00452f5e1a18decd80068d18e602e857f674 (patch) | |
tree | 817b78b03884787eb085e544e4a1feb97271d03c /lib/VNWeb/Elm.pm | |
parent | 50e4f6602459b3b0d2ec1695e06630e079580e9a (diff) |
imgflag: Fix uid integrity + properly handle user account deletion
I made sure that the image_votes.uid column could be NULL, but then
forgot to add the foreign key reference to make this machinery work.
I've split the image_votes_cache trigger in two parts as a performance
improvement - there's no need to update the cache then the uid or date
changes. Otherwise deleting a user account with many image votes may
take a few minutes.
Diffstat (limited to 'lib/VNWeb/Elm.pm')
-rw-r--r-- | lib/VNWeb/Elm.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/Elm.pm b/lib/VNWeb/Elm.pm index d6d8d862..d8f76303 100644 --- a/lib/VNWeb/Elm.pm +++ b/lib/VNWeb/Elm.pm @@ -99,7 +99,7 @@ our %apis = ( } }, votes => { aoh => { user => {}, - uid => { uint => 1 }, + uid => { uint => 1, required => 0 }, sexual => { uint => 1 }, violence => { uint => 1 }, } }, |