chore(cart): completed at (#8921)
This commit is contained in:
committed by
GitHub
parent
89c6ef8fc9
commit
4ffb49efd0
@@ -0,0 +1,15 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20240831125857 extends Migration {
|
||||
async up(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "cart" add column if not exists "completed_at" timestamptz null;'
|
||||
)
|
||||
}
|
||||
|
||||
async down(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "cart" drop column if exists "completed_at";'
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -147,6 +147,9 @@ export default class Cart {
|
||||
})
|
||||
shipping_methods = new Collection<Rel<ShippingMethod>>(this)
|
||||
|
||||
@Property({ columnType: "timestamptz", nullable: true })
|
||||
completed_at: Date | null = null
|
||||
|
||||
@Property({
|
||||
onCreate: () => new Date(),
|
||||
columnType: "timestamptz",
|
||||
|
||||
Reference in New Issue
Block a user