|
1
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations" |
|
2
|
|
|
3
|
export class Migration20260411223700 extends Migration { |
|
4
|
override async up(): Promise<void> { |
|
5
|
this.addSql( |
|
6
|
`alter table if exists "payment_session" drop constraint if exists "payment_session_status_check";` |
|
7
|
) |
|
8
|
|
|
9
|
this.addSql( |
|
10
|
`alter table if exists "payment_session" add constraint "payment_session_status_check" check("status" in ('authorized', 'captured', 'pending', 'requires_more', 'error', 'canceled', 'pending_authorization'));` |
|
11
|
) |
|
12
|
} |
|
13
|
|
|
14
|
override async down(): Promise<void> { |
|
15
|
this.addSql( |
|
16
|
`alter table if exists "payment_session" drop constraint if exists "payment_session_status_check";` |
|
17
|
) |
|
18
|
|
|
19
|
this.addSql( |
|
20
|
`alter table if exists "payment_session" add constraint "payment_session_status_check" check("status" in ('authorized', 'captured', 'pending', 'requires_more', 'error', 'canceled'));` |
|
21
|
) |
|
22
|
} |
|
23
|
} |