000040_fix_fileinfo_soft_deletes.up.sql
TLDR
This SQL script updates the DeleteAt
column of the FileInfo
table in the database. If the .plugin
variable is true, it sets the DeleteAt
values to 0 for all records where CreatorId
is 'boards' and DeleteAt
is not already 0. If the .plugin
variable is false, it selects 1.
{{if .plugin}}
UPDATE FileInfo
SET DeleteAt = 0
WHERE CreatorId = 'boards'
AND DeleteAt != 0;
{{else}}
SELECT 1;
{{end}}