chore(order): custom display id (#14024)
* chore(order): Accept a custom display generator option * chore(order): Accept a custom display generator option * wip * wip * finalize * Create tricky-olives-battle.md * fields * changeset * update integration tests * update migrations * fix changeset
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
import { Migration } from "@medusajs/framework/mikro-orm/migrations"
|
||||
|
||||
export class Migration20250911092221 extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_product_status" ON "product" (status) WHERE deleted_at IS NULL;`);
|
||||
this.addSql(
|
||||
`CREATE INDEX IF NOT EXISTS "IDX_product_status" ON "product" (status) WHERE deleted_at IS NULL;`
|
||||
)
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(`drop index if exists "IDX_product_status";`);
|
||||
this.addSql(`drop index if exists "IDX_product_status";`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
import { Migration } from "@medusajs/framework/mikro-orm/migrations"
|
||||
|
||||
export class Migration20251011090511 extends Migration {
|
||||
// UP: Fixes the bug by dropping the bad index from product_collection.
|
||||
// UP: Fixes the bug by dropping the bad index from product_collection.
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(
|
||||
'DROP INDEX IF EXISTS "IDX_product_category_deleted_at";'
|
||||
);
|
||||
this.addSql('DROP INDEX IF EXISTS "IDX_product_category_deleted_at";')
|
||||
}
|
||||
|
||||
// DOWN: Reverts the fix by re-creating the original bug.
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(
|
||||
'CREATE INDEX IF NOT EXISTS "IDX_product_category_deleted_at" ON "product_collection" ("deleted_at");'
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user