This commit is contained in:
2026-05-18 13:51:34 +03:30
parent 3889ec19e3
commit 3e4e9e1f77
4 changed files with 681 additions and 0 deletions
@@ -0,0 +1,11 @@
import { Migration } from '@mikro-orm/migrations';
export class Migration20260518092926_addCatalogueSlug extends Migration {
override async up(): Promise<void> {
this.addSql(`alter table "catalogue" add column "slug" varchar(255);`);
this.addSql(`update "catalogue" set "slug" = lower("id"::text) where "slug" is null;`);
this.addSql(`alter table "catalogue" alter column "slug" set not null;`);
}
}