Raw
1 import { Migration } from "@medusajs/framework/mikro-orm/migrations"
2
3 export class Migration20240821170920 extends Migration {
4 async up(): Promise<void> {
5 this.addSql(
6 'alter table if exists "return" add column if not exists "created_by" text null;'
7 )
8
9 this.addSql(
10 'alter table if exists "order_exchange" add column if not exists "created_by" text null;'
11 )
12
13 this.addSql(
14 'alter table if exists "order_claim" add column if not exists "created_by" text null;'
15 )
16 }
17
18 async down(): Promise<void> {
19 this.addSql(
20 'alter table if exists "return" drop column if exists "created_by";'
21 )
22
23 this.addSql(
24 'alter table if exists "order_exchange" drop column if exists "created_by";'
25 )
26
27 this.addSql(
28 'alter table if exists "order_claim" drop column if exists "created_by";'
29 )
30 }
31 }