|
1
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations" |
|
2
|
|
|
3
|
export class Migration20250127144442 extends Migration { |
|
4
|
override async up(): Promise<void> { |
|
5
|
this.addSql( |
|
6
|
`alter table if exists "index_data" add column if not exists "staled_at" timestamptz null;` |
|
7
|
) |
|
8
|
|
|
9
|
this.addSql( |
|
10
|
`alter table if exists "index_relation" add column if not exists "staled_at" timestamptz null;` |
|
11
|
) |
|
12
|
} |
|
13
|
|
|
14
|
override async down(): Promise<void> { |
|
15
|
this.addSql( |
|
16
|
`alter table if exists "index_data" drop column if exists "staled_at";` |
|
17
|
) |
|
18
|
|
|
19
|
this.addSql( |
|
20
|
`alter table if exists "index_relation" drop column if exists "staled_at";` |
|
21
|
) |
|
22
|
} |
|
23
|
} |