From a665a39523e36de2d187cd216269dcf3a72a1ddd Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Thu, 5 Jan 2023 17:10:13 +1100 Subject: channel flags whoops --- scripts/stagingMigration/postgres/1672815835837-staging.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/stagingMigration') diff --git a/scripts/stagingMigration/postgres/1672815835837-staging.js b/scripts/stagingMigration/postgres/1672815835837-staging.js index 36bbf504..8ccf16da 100644 --- a/scripts/stagingMigration/postgres/1672815835837-staging.js +++ b/scripts/stagingMigration/postgres/1672815835837-staging.js @@ -24,7 +24,9 @@ module.exports = class staging1672815835837 { await queryRunner.query(`ALTER TABLE "client_release" ADD "pub_date" TIMESTAMP NOT NULL`); await queryRunner.query(`UPDATE channels SET nsfw = false WHERE nsfw IS NULL`); await queryRunner.query(`ALTER TABLE "channels" ALTER COLUMN "nsfw" SET NOT NULL`); + await queryRunner.query(`UPDATE channels SET flags = 0 WHERE flags IS NULL`); await queryRunner.query(`ALTER TABLE "channels" ALTER COLUMN "flags" SET NOT NULL`); + await queryRunner.query(`UPDATE channels SET default_thread_rate_limit_per_user = 0 WHERE default_thread_rate_limit_per_user IS NULL`); await queryRunner.query(`ALTER TABLE "channels" ALTER COLUMN "default_thread_rate_limit_per_user" SET NOT NULL`); await queryRunner.query(`ALTER TABLE "user_settings" DROP CONSTRAINT IF EXISTS "PK_e81f8bb92802737337d35c00981"`); await queryRunner.query(`ALTER TABLE "user_settings" DROP COLUMN IF EXISTS "index"`); -- cgit 1.4.1