import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddGoogleShoppingOfferHistory1655897666059 implements MigrationInterface { name = 'AddGoogleShoppingOfferHistory1655897666059'; public async up(queryRunner: QueryRunner): Promise { await queryRunner.query( `CREATE TABLE "google_shopping_offer_histories" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "googleShoppingId" character varying NOT NULL, "url" character varying NOT NULL, "price" double precision NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_37a0bdcd1e727b6cfff5d3546d3" PRIMARY KEY ("id"))` ); } public async down(queryRunner: QueryRunner): Promise { await queryRunner.query(`DROP TABLE "google_shopping_offer_histories"`); } }