feat(seed): son 6 ayın örnek işlemleri ve 003 migration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 03:23:30 +03:00
parent dcfa2f8c8d
commit 3acd71fd59
6 changed files with 530 additions and 5 deletions
+12
View File
@@ -0,0 +1,12 @@
import { PayeeModel } from "@/models/payee";
import { TransactionModel } from "@/models/transaction";
import type { Migration } from "./types";
export const migration: Migration = {
name: "003-transactions",
description: "transactions ve payees index'leri",
async up() {
await TransactionModel.createIndexes();
await PayeeModel.createIndexes();
},
};
+2 -1
View File
@@ -2,10 +2,11 @@ import { getDb } from "@/lib/db/mongo";
import { connectMongoose } from "@/lib/db/mongoose";
import { migration as m001 } from "./001-initial-indexes";
import { migration as m002 } from "./002-accounts-categories";
import { migration as m003 } from "./003-transactions";
import type { Migration } from "./types";
/** Sıralı migration listesi. Yeni migration: dosyayı ekle ve buraya sırayla ekle. */
export const MIGRATIONS: Migration[] = [m001, m002];
export const MIGRATIONS: Migration[] = [m001, m002, m003];
const COLLECTION = "migrations";