|
1
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations"; |
|
2
|
|
|
3
|
export class Migration20250520081315 extends Migration { |
|
4
|
|
|
5
|
override async up(): Promise<void> { |
|
6
|
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" type text using ("customer_id"::text);`); |
|
7
|
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" drop not null;`); |
|
8
|
} |
|
9
|
|
|
10
|
override async down(): Promise<void> { |
|
11
|
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" type text using ("customer_id"::text);`); |
|
12
|
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" set not null;`); |
|
13
|
} |
|
14
|
|
|
15
|
} |