PBL6-informative-system / backend /src /migrations /1730801455870-AddOrderAndPayment.ts
Artteiv's picture
fix: update branch admin
9e8f9e3
raw
history blame
991 Bytes
import { MigrationInterface, QueryRunner } from "typeorm";
export class AddOrderAndPayment1730801455870 implements MigrationInterface {
name = 'AddOrderAndPayment1730801455870'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "feeds" ADD "delete_at" TIMESTAMP`);
await queryRunner.query(`ALTER TABLE "menu_items" ADD "delete_at" TIMESTAMP`);
await queryRunner.query(`ALTER TABLE "branches" ADD "delete_at" TIMESTAMP`);
await queryRunner.query(`ALTER TABLE "orders" ADD "note" character varying`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "orders" DROP COLUMN "note"`);
await queryRunner.query(`ALTER TABLE "branches" DROP COLUMN "delete_at"`);
await queryRunner.query(`ALTER TABLE "menu_items" DROP COLUMN "delete_at"`);
await queryRunner.query(`ALTER TABLE "feeds" DROP COLUMN "delete_at"`);
}
}