1 import { Migration } from "@medusajs/framework/mikro-orm/migrations"
2
3 export class Migration20251011090511 extends Migration {
4 // UP: Fixes the bug by dropping the bad index from product_collection.
5 override async up(): Promise<void> {
6 this.addSql('DROP INDEX IF EXISTS "IDX_product_category_deleted_at";')
7 }
8
9 // DOWN: Reverts the fix by re-creating the original bug.
10 override async down(): Promise<void> {
11 this.addSql(
12 'CREATE INDEX IF NOT EXISTS "IDX_product_category_deleted_at" ON "product_collection" ("deleted_at");'
13 )
14 }
15 }