import type { Kysely } from "kysely"; import { execDdl } from "../src/migration-helpers.ts"; // 日志模块(界面第二轮 V 线):GET /logs 把定时任务运行记录按开始时间倒序与其它来源合并, // 原有索引只有 (job_id, started_at),全局倒序要整表排序;补一个按时间的索引。 // biome-ignore lint/suspicious/noExplicitAny: 迁移不依赖应用表类型 export async function up(db: Kysely): Promise { await execDdl(db, `create index if not exists scheduled_job_run_started_idx on scheduled_job_run (started_at desc);`); } // biome-ignore lint/suspicious/noExplicitAny: 同上 export async function down(db: Kysely): Promise { await execDdl(db, `drop index if exists scheduled_job_run_started_idx;`); }