Raw
1 import { Migration } from "@mikro-orm/migrations"
2
3 export class Migration20260623180000 extends Migration {
4 override async up(): Promise<void> {
5 this.addSql(`
6 CREATE UNIQUE INDEX IF NOT EXISTS "IDX_product_option_global_title_unique"
7 ON "product_option" (title)
8 WHERE deleted_at IS NULL AND is_exclusive = false;
9 `)
10 }
11
12 override async down(): Promise<void> {
13 this.addSql(
14 `drop index if exists "IDX_product_option_global_title_unique";`
15 )
16 }
17 }