|
1
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations"; |
|
2
|
|
|
3
|
export class Migration20250206105639 extends Migration { |
|
4
|
|
|
5
|
override async up(): Promise<void> { |
|
6
|
this.addSql(`drop table if exists "payment_method_token" cascade;`); |
|
7
|
} |
|
8
|
|
|
9
|
override async down(): Promise<void> { |
|
10
|
this.addSql(`create table if not exists "payment_method_token" ("id" text not null, "provider_id" text not null, "data" jsonb null, "name" text not null, "type_detail" text null, "description_detail" text null, "metadata" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "payment_method_token_pkey" primary key ("id"));`); |
|
11
|
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_payment_method_token_deleted_at" ON "payment_method_token" (deleted_at) WHERE deleted_at IS NULL;`); |
|
12
|
} |
|
13
|
|
|
14
|
} |