|
1
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations" |
|
2
|
|
|
3
|
export class Migration20240715174100 extends Migration { |
|
4
|
async up(): Promise<void> { |
|
5
|
const sql = ` |
|
6
|
DROP INDEX IF EXISTS "IDX_order_shipping_method_shipping_option_id"; |
|
7
|
|
|
8
|
ALTER TABLE "order_shipping_method" |
|
9
|
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL; |
|
10
|
|
|
11
|
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_method_shipping_option_id" ON "order_shipping_method" ( |
|
12
|
shipping_option_id |
|
13
|
) WHERE deleted_at IS NULL; |
|
14
|
` |
|
15
|
|
|
16
|
this.addSql(sql) |
|
17
|
} |
|
18
|
} |