blob: cf770afca0b0041eca6ad49070b143db90399a44 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
import { MigrationInterface, QueryRunner } from "typeorm";
export class DeleteBotUsersWithoutAnApplication1761113394664 implements MigrationInterface {
name = "DeleteBotUsersWithoutAnApplication1761113394664";
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> {}
}
|