summary refs log tree commit diff
path: root/src/util/migrations/postgres/1660549242936-fix_nullables.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-25 12:55:42 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-25 13:00:31 +1000
commitd946547a9233d866e793e1c68f11d98cb2f7d390 (patch)
tree2ff2677432e2e874f0784b115202f3846e68deb0 /src/util/migrations/postgres/1660549242936-fix_nullables.ts
parentMerge remote-tracking branch 'upstream/staging' into fix/categoryNames (diff)
parentMerge pull request #799 from MaddyUnderStars/feat/captchaVerify (diff)
downloadserver-d946547a9233d866e793e1c68f11d98cb2f7d390.tar.xz
Merge remote-tracking branch 'upstream/staging' into fix/categoryNames
Also allow voice to skip checks
Diffstat (limited to 'src/util/migrations/postgres/1660549242936-fix_nullables.ts')
-rw-r--r--src/util/migrations/postgres/1660549242936-fix_nullables.ts19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/util/migrations/postgres/1660549242936-fix_nullables.ts b/src/util/migrations/postgres/1660549242936-fix_nullables.ts

index b9a0194d..07fd52f7 100644 --- a/src/util/migrations/postgres/1660549242936-fix_nullables.ts +++ b/src/util/migrations/postgres/1660549242936-fix_nullables.ts
@@ -1,30 +1,29 @@ import { MigrationInterface, QueryRunner } from "typeorm"; export class fixNullables1660549242936 implements MigrationInterface { - name = 'fixNullables1660549242936' + name = "fixNullables1660549242936"; - public async up(queryRunner: QueryRunner): Promise<void> { - await queryRunner.query(` + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(` ALTER TABLE "users" ALTER COLUMN "bio" DROP NOT NULL `); - await queryRunner.query(` + await queryRunner.query(` ALTER TABLE "users" ALTER COLUMN "mfa_enabled" DROP NOT NULL `); - } + } - public async down(queryRunner: QueryRunner): Promise<void> { - await queryRunner.query(` + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(` ALTER TABLE "users" ALTER COLUMN "mfa_enabled" SET NOT NULL `); - await queryRunner.query(` + await queryRunner.query(` ALTER TABLE "users" ALTER COLUMN "bio" SET NOT NULL `); - } - + } }