summary refs log tree commit diff
path: root/src/util/migration/postgres
diff options
context:
space:
mode:
authorChrisChrome <chris@chrischro.me>2026-02-16 13:13:46 -0700
committerChrisChrome <chris@chrischro.me>2026-02-16 13:13:46 -0700
commit3c844ae777a367d0c48daeea83bc9205738bbc69 (patch)
treeea48661a1827ec475e092bf8b05d8d34c3de8ad7 /src/util/migration/postgres
parentSeparate IP check options during registration (diff)
downloadserver-ts-3c844ae777a367d0c48daeea83bc9205738bbc69.tar.xz
Fix loading discord guild templates
Diffstat (limited to 'src/util/migration/postgres')
-rw-r--r--src/util/migration/postgres/1771271159006-set-role-managed-default.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util/migration/postgres/1771271159006-set-role-managed-default.ts b/src/util/migration/postgres/1771271159006-set-role-managed-default.ts
new file mode 100644

index 000000000..fad55f237 --- /dev/null +++ b/src/util/migration/postgres/1771271159006-set-role-managed-default.ts
@@ -0,0 +1,13 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class SetRoleManagedDefault1771271159006 implements MigrationInterface { + name = "SetRoleManagedDefault1771271159006"; + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`ALTER TABLE "roles" ALTER COLUMN "managed" SET DEFAULT false`); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`ALTER TABLE "roles" ALTER COLUMN "managed" DROP DEFAULT`); + } +}