import type { Kysely } from "kysely"; import { execDdl } from "../src/migration-helpers.ts"; // One-off manual downloads are plans without a subscription slot. // biome-ignore lint/suspicious/noExplicitAny: migrations are independent of application types export async function up(db: Kysely): Promise { await execDdl( db, "alter table acquisition_plan alter column slot_id drop not null; alter table download_task add column import_plan_id uuid references acquisition_plan(id) on delete set null", ); } // biome-ignore lint/suspicious/noExplicitAny: migrations are independent of application types export async function down(db: Kysely): Promise { await execDdl( db, "alter table download_task drop column import_plan_id; alter table acquisition_plan alter column slot_id set not null", ); }