import { ImportBatchModel } from "@/models/import-batch"; import { TransactionModel } from "@/models/transaction"; import type { Migration } from "./types"; /** Ekstre içe aktarma (Faz 17): importBatches index'i ve işlemlerde tekrar engeli index'i. */ export const migration: Migration = { name: "017-imports", description: "içe aktarma partileri ve işlemlerde tekrar engeli (importKey) index'leri", async up() { await ImportBatchModel.createIndexes(); await TransactionModel.createIndexes(); }, async down(db) { await db .collection("transactions") .dropIndex("householdId_1_importKey_1") .catch(() => {}); }, };