mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 13:37:28 +00:00
14 lines
544 B
TypeScript
14 lines
544 B
TypeScript
import { SOURCE, USER_STATUS } from 'src/helpers/user_lifecycle';
|
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class updateUserStatus1666814745413 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
const entityManager = queryRunner.manager;
|
|
await entityManager.query('update users set status = $1, source = $2 where invitation_token IS NULL;', [
|
|
USER_STATUS.ACTIVE,
|
|
SOURCE.INVITE,
|
|
]);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
|
}
|