import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddRawGoogleProductPageEntity1657735785191 implements MigrationInterface { name = 'AddRawGoogleProductPageEntity1657735785191'; public async up(queryRunner: QueryRunner): Promise { await queryRunner.query( `CREATE TABLE "raw_google_product_page" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "googleShoppingId" character varying NOT NULL, "rawData" jsonb NOT NULL, CONSTRAINT "PK_10a08a3e7c78684b3835263abf7" PRIMARY KEY ("id"))` ); } public async down(queryRunner: QueryRunner): Promise { await queryRunner.query(`DROP TABLE "raw_google_product_page"`); } }