12a96a7c70
* chore(): Move peer deps into a single package and re export from framework * WIP * update core packages * update cli and deps * update medusa * update exports path * remove analyze * update modules deps * finalise changes * fix yarn * fix import * Refactor peer dependencies into a single package Consolidate peer dependencies into one package and re-export from the framework. * update changeset * Update .changeset/brown-cows-sleep.md Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> * rm deps * fix deps * increase timeout * upgrade version * update versions * update versions * fixes * update lock * fix missing import * fix missing import --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
26 lines
717 B
TypeScript
26 lines
717 B
TypeScript
import { Migration } from "@medusajs/framework/mikro-orm/migrations"
|
|
|
|
export class Migration20250128174331 extends Migration {
|
|
override async up(): Promise<void> {
|
|
this.addSql(
|
|
`alter table if exists "workflow_execution" add column if not exists "retention_time" integer null;`
|
|
)
|
|
this.addSql(`
|
|
UPDATE workflow_execution
|
|
SET retention_time = (
|
|
SELECT COALESCE(
|
|
(execution->'options'->>'retentionTime')::integer,
|
|
0
|
|
)
|
|
)
|
|
WHERE execution->'options' ? 'retentionTime';
|
|
`)
|
|
}
|
|
|
|
override async down(): Promise<void> {
|
|
this.addSql(
|
|
`alter table if exists "workflow_execution" drop column if exists "retention_time";`
|
|
)
|
|
}
|
|
}
|