Spaces:
Sleeping
Sleeping
File size: 991 Bytes
9e8f9e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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"`);
}
}
|