feat(dashboard,core-flows,types,order): change order accepts price updates (#9476)
* chore: change order can accept price updates * chore: add changes to transformed order * chore: fix transform * chore: transform raw unit price
This commit is contained in:
@@ -790,6 +790,24 @@
|
||||
"nullable": false,
|
||||
"mappedType": "text"
|
||||
},
|
||||
"unit_price": {
|
||||
"name": "unit_price",
|
||||
"type": "numeric",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": true,
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_unit_price": {
|
||||
"name": "raw_unit_price",
|
||||
"type": "jsonb",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": true,
|
||||
"mappedType": "json"
|
||||
},
|
||||
"quantity": {
|
||||
"name": "quantity",
|
||||
"type": "numeric",
|
||||
@@ -815,7 +833,6 @@
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_fulfilled_quantity": {
|
||||
@@ -834,7 +851,6 @@
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_delivered_quantity": {
|
||||
@@ -853,7 +869,6 @@
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_shipped_quantity": {
|
||||
@@ -872,7 +887,6 @@
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_return_requested_quantity": {
|
||||
@@ -891,7 +905,6 @@
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_return_received_quantity": {
|
||||
@@ -910,7 +923,6 @@
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_return_dismissed_quantity": {
|
||||
@@ -929,7 +941,6 @@
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"raw_written_off_quantity": {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20240930122627 extends Migration {
|
||||
async up(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "order_item" add column if not exists "unit_price" numeric null, add column if not exists "raw_unit_price" jsonb null;'
|
||||
)
|
||||
}
|
||||
|
||||
async down(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "order_item" drop column if exists "unit_price";'
|
||||
)
|
||||
this.addSql(
|
||||
'alter table if exists "order_item" drop column if exists "raw_unit_price";'
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user