diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-05 17:10:13 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-05 17:10:13 +1100 |
commit | ea903baa1574f2f054013ae9f23a4574962da2c1 (patch) | |
tree | 0be5e56bdd30beb5a262ab877da38fd4847ebd77 | |
parent | Add migrations (#923) (diff) | |
download | server-ea903baa1574f2f054013ae9f23a4574962da2c1.tar.xz |
channel flags whoops
-rw-r--r-- | scripts/stagingMigration/postgres/1672815835837-staging.js | 2 |
1 files changed, 2 insertions, 0 deletions
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"`); |