bg migrations

This commit is contained in:
2026-06-20 20:38:03 +03:30
parent ef598a4c28
commit 2786010f0d
2 changed files with 324 additions and 0 deletions
@@ -0,0 +1,14 @@
import { Migration } from '@mikro-orm/migrations';
export class Migration20260620170106 extends Migration {
override async up(): Promise<void> {
this.addSql(`create table "backgrounds" ("id" char(26) not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, "url" varchar(255) not null, constraint "backgrounds_pkey" primary key ("id"));`);
this.addSql(`create index "backgrounds_created_at_index" on "backgrounds" ("created_at");`);
this.addSql(`create index "backgrounds_deleted_at_index" on "backgrounds" ("deleted_at");`);
this.addSql(`alter table "restaurants" add column "bg_url" varchar(255) null, add column "bg_opacity" varchar(255) null, add column "bg_blur" varchar(255) null, add column "bg_overlay" varchar(255) null;`);
}
}