init
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class RemovePriceUnitProductCol1779721786152 implements MigrationInterface {
|
||||
name = 'RemovePriceUnitProductCol1779721786152';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "products" DROP COLUMN "priceUnit"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."products_priceunit_enum"`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TYPE "public"."products_priceunit_enum" AS ENUM('USD')`);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "products" ADD "priceUnit" "public"."products_priceunit_enum" NOT NULL DEFAULT 'USD'`
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user