15 lines
542 B
TypeScript
15 lines
542 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class RemoveNotNullFromInvoicePurpose1770032438762 implements MigrationInterface {
|
|
name = 'RemoveNotNullFromInvoicePurpose1770032438762'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "invoice" ALTER COLUMN "purpose" DROP NOT NULL`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "invoice" ALTER COLUMN "purpose" SET NOT NULL`);
|
|
}
|
|
|
|
}
|