chore: add compare_at_unit_price when price list price is retrieved (#9564)
* chore: add compare_at_unit_price when price list price is retrieved * chore: add test for update item + more fixes along the way * chore: fix tests * chore: add refresh spec * Apply suggestions from code review Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com> * chore: use undefined checker * chore: switch to map --------- Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20241014142943 extends Migration {
|
||||
async up(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "order_item" add column if not exists "compare_at_unit_price" numeric null, add column if not exists "raw_compare_at_unit_price" jsonb null;'
|
||||
)
|
||||
}
|
||||
|
||||
async down(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "order_item" drop column if exists "compare_at_unit_price";'
|
||||
)
|
||||
this.addSql(
|
||||
'alter table if exists "order_item" drop column if exists "raw_compare_at_unit_price";'
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user