add packing fee
This commit is contained in:
@@ -4284,6 +4284,18 @@
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"packing_fee": {
|
||||
"name": "packing_fee",
|
||||
"type": "numeric(10,0)",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"precision": 10,
|
||||
"scale": 0,
|
||||
"default": "0",
|
||||
"mappedType": "decimal"
|
||||
},
|
||||
"total": {
|
||||
"name": "total",
|
||||
"type": "numeric(10,0)",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
|
||||
export class Migration20260701062227_addPackingFeeToOrders extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`alter table "orders" add column "packing_fee" numeric(10,0) not null default 0;`);
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(`alter table "orders" drop column "packing_fee";`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user