From 2015cf1488827a9f0eb725449336135de2701aec Mon Sep 17 00:00:00 2001 From: mini-bomba <55105495+mini-bomba@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:33:51 +0200 Subject: [PATCH] DB migration: Hide any visible dearrow submissions from banned users --- databases/_upgrade_sponsorTimes_38.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 databases/_upgrade_sponsorTimes_38.sql diff --git a/databases/_upgrade_sponsorTimes_38.sql b/databases/_upgrade_sponsorTimes_38.sql new file mode 100644 index 0000000..ac5aa96 --- /dev/null +++ b/databases/_upgrade_sponsorTimes_38.sql @@ -0,0 +1,11 @@ +BEGIN TRANSACTION; + +UPDATE "titleVotes" SET "shadowHidden" = 1 +WHERE "UUID" IN (SELECT "UUID" FROM "titles" INNER JOIN "shadowBannedUsers" "bans" ON "titles"."userID" = "bans"."userID"); + +UPDATE "thumbnailVotes" SET "shadowHidden" = 1 +WHERE "UUID" IN (SELECT "UUID" FROM "thumbnails" INNER JOIN "shadowBannedUsers" "bans" ON "thumbnails"."userID" = "bans"."userID"); + +UPDATE "config" SET value = 38 WHERE key = 'version'; + +COMMIT;