feat(core-flows,dashboard,types,fulfillment,medusa): uses requires shipping throughout lifecycle (#9170)
what: - uses requires shipping throughout lifecycle https://github.com/user-attachments/assets/d5ba89d3-5ea0-49c4-b2d5-490c4764933e
This commit is contained in:
1 parent
e54b339324
commit
69f6645716
22 files changed
+490
-108
No files matched your search
@@ -1359,6 +1359,16 @@
|
||||
"nullable": true,
|
||||
"mappedType": "text"
|
||||
},
|
||||
"requires_shipping": {
|
||||
"name": "requires_shipping",
|
||||
"type": "boolean",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "true",
|
||||
"mappedType": "boolean"
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "timestamptz",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20240917161003 extends Migration {
|
||||
async up(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "fulfillment" add column if not exists "requires_shipping" boolean not null default true;'
|
||||
)
|
||||
}
|
||||
|
||||
async down(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "fulfillment" drop column if exists "requires_shipping";'
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -135,6 +135,9 @@ export default class Fulfillment {
|
||||
})
|
||||
delivery_address!: Rel<FulfillmentAddress>
|
||||
|
||||
@Property({ columnType: "boolean", default: true })
|
||||
requires_shipping: boolean = true
|
||||
|
||||
@OneToMany(() => FulfillmentItem, (item) => item.fulfillment, {
|
||||
cascade: [Cascade.PERSIST, "soft-remove"] as any,
|
||||
orphanRemoval: true,
|
||||
|
||||
Reference in new issue
Block a user