-- CreateIndex
-- CONCURRENTLY:表已 379 万行,普通 CREATE INDEX 会 ACCESS EXCLUSIVE 锁全表(阻塞线上写入摄入);
-- CONCURRENTLY 不能跑在事务里,Prisma migrate 对整份 migration.sql 有事务包裹,故本条不能靠
-- `prisma migrate deploy` 直接跑 —— 部署时改为手动 psql 执行 + `prisma migrate resolve --applied`。
CREATE INDEX CONCURRENTLY IF NOT EXISTS "patient_transactions_host_id_occurred_at_idx" ON "patient_transactions"("host_id", "occurred_at");
