Files
dkala-api/database/migrations/Migration20260704120000_AddShopBackgroundFields.ts
T
morteza f8f3fa528e
deploy to danak / build_and_deploy (push) Has been cancelled
background pattern
2026-07-04 15:43:13 +03:30

22 lines
951 B
TypeScript

import { Migration } from '@mikro-orm/migrations';
export class Migration20260704120000_AddShopBackgroundFields extends Migration {
override async up(): Promise<void> {
this.addSql(`alter table "shops" add column "bg_type" varchar(255) null;`);
this.addSql(`alter table "shops" add column "bg_url" varchar(255) null;`);
this.addSql(`alter table "shops" add column "bg_opacity" varchar(255) null;`);
this.addSql(`alter table "shops" add column "bg_blur" varchar(255) null;`);
this.addSql(`alter table "shops" add column "bg_overlay" varchar(255) null;`);
}
override async down(): Promise<void> {
this.addSql(`alter table "shops" drop column "bg_overlay";`);
this.addSql(`alter table "shops" drop column "bg_blur";`);
this.addSql(`alter table "shops" drop column "bg_opacity";`);
this.addSql(`alter table "shops" drop column "bg_url";`);
this.addSql(`alter table "shops" drop column "bg_type";`);
}
}