mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-31 17:17:23 +02:00
* refactor: use consistent folder structure across workflow, core, and cli * setup typescript project references across workflow, core, and cli
23 lines
642 B
TypeScript
23 lines
642 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
import config from '@/config';
|
|
import { logMigrationEnd, logMigrationStart } from '@db/utils/migrationHelpers';
|
|
|
|
export class LowerCaseUserEmail1648740597343 implements MigrationInterface {
|
|
name = 'LowerCaseUserEmail1648740597343';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
logMigrationStart(this.name);
|
|
|
|
const tablePrefix = config.getEnv('database.tablePrefix');
|
|
|
|
await queryRunner.query(`
|
|
UPDATE "${tablePrefix}user"
|
|
SET email = LOWER(email);
|
|
`);
|
|
|
|
logMigrationEnd(this.name);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
|
}
|