import { AssetPriceModel } from "@/models/asset-price"; import { InKindDebtModel } from "@/models/in-kind-debt"; import type { Migration } from "./types"; export const migration: Migration = { name: "008-in-kind", description: "assetPrices ve inKindDebts index'leri; işlemlerde aynî borç alanları", async up(db) { await db .collection("transactions") .updateMany( { inKindDebtId: { $exists: false } }, { $set: { inKindDebtId: null, inKindRole: null } }, ); await AssetPriceModel.createIndexes(); await InKindDebtModel.createIndexes(); }, };