11 lines
314 B
TypeScript
11 lines
314 B
TypeScript
import type { MigrationContext, IrreversibleMigration } from '@db/types';
|
|
|
|
export class LowerCaseUserEmail1648740597343 implements IrreversibleMigration {
|
|
async up({ queryRunner, tablePrefix }: MigrationContext) {
|
|
await queryRunner.query(`
|
|
UPDATE "${tablePrefix}user"
|
|
SET email = LOWER(email);
|
|
`);
|
|
}
|
|
}
|