summary refs log tree commit diff
path: root/src/util/migration/postgres
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-10 22:26:30 +0100
committerRory& <root@rory.gay>2026-02-10 22:26:30 +0100
commitb7f3535d093cc75fc665b5ffd4ed9d5b563f1aff (patch)
tree63ead46ce496c30ec7c9b719324fb607b7cabc98 /src/util/migration/postgres
parentMerge pull request #1493 from CyberL1/feat/docker-image-build-workflows (diff)
downloadserver-ts-b7f3535d093cc75fc665b5ffd4ed9d5b563f1aff.tar.xz
Add discovery filtering
Diffstat (limited to 'src/util/migration/postgres')
-rw-r--r--src/util/migration/postgres/1770748070808-GuildDiscoveryHoisting.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/util/migration/postgres/1770748070808-GuildDiscoveryHoisting.ts b/src/util/migration/postgres/1770748070808-GuildDiscoveryHoisting.ts
new file mode 100644

index 000000000..de8783883 --- /dev/null +++ b/src/util/migration/postgres/1770748070808-GuildDiscoveryHoisting.ts
@@ -0,0 +1,15 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class GuildDiscoveryHoisting1770748070808 implements MigrationInterface { + name = "GuildDiscoveryHoisting1770748070808"; + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`ALTER TABLE "guilds" ADD "discovery_weight" integer NOT NULL`); + await queryRunner.query(`ALTER TABLE "guilds" ADD "discovery_excluded" boolean NOT NULL`); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`ALTER TABLE "guilds" DROP COLUMN "discovery_excluded"`); + await queryRunner.query(`ALTER TABLE "guilds" DROP COLUMN "discovery_weight"`); + } +}