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:
@@ -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,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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user