Skip to content

Commit 979f3ab

Browse files
committed
Migrate email column change
1 parent 7b87f51 commit 979f3ab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
3+
export class MakeUserEmailNullable1741219585820 implements MigrationInterface {
4+
name = 'MakeUserEmailNullable1741219585820'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`ALTER TABLE "alcs"."user" ALTER COLUMN "email" DROP NOT NULL`);
8+
}
9+
10+
public async down(queryRunner: QueryRunner): Promise<void> {
11+
await queryRunner.query(`ALTER TABLE "alcs"."user" ALTER COLUMN "email" SET NOT NULL`);
12+
}
13+
14+
}

0 commit comments

Comments
 (0)