diff --git a/packages/server/postgres/migrations/1728596434080_Task-phase2fixup.ts b/packages/server/postgres/migrations/1728596434080_Task-phase2fixup.ts new file mode 100644 index 00000000000..e72b6473c82 --- /dev/null +++ b/packages/server/postgres/migrations/1728596434080_Task-phase2fixup.ts @@ -0,0 +1,20 @@ +import {Kysely, PostgresDialect, sql} from 'kysely' +import getPg from '../getPg' + +export async function up() { + const pg = new Kysely({ + dialect: new PostgresDialect({ + pool: getPg() + }) + }) + + await pg + .updateTable('Task') + // coerce the serialized string to jsonb + .set({content: sql`(content #>> '{}')::jsonb`}) + .execute() +} + +export async function down() { + // noop +}