Merge pull request #1358 from CyberL1/fix/delete-bots-with-no-applicaiton
chore: do a migration to delete bot users with no application
This commit is contained in:
commit
840652f003
@ -0,0 +1,9 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class DeleteBotUsersWithoutAnApplication1761113394664 implements MigrationInterface {
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`DELETE FROM users WHERE bot = true AND id NOT IN (SELECT bot_user_id FROM applications);`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user