feat(db): migration mekanizması ve ilk index migration'ı

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 02:35:01 +03:00
parent 3644e081b1
commit b79951601c
7 changed files with 82 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
import { AuditLogModel } from "@/models/audit-log";
import { HouseholdModel } from "@/models/household";
import { HouseholdMemberModel } from "@/models/household-member";
import type { Migration } from "./types";
/** Hane, üyelik ve denetim kaydı index'leri (Mongoose şemalarındaki tanımlarla). */
export const migration: Migration = {
name: "001-initial-indexes",
description: "households, householdMembers ve auditLogs index'leri",
async up() {
await HouseholdModel.createIndexes();
await HouseholdMemberModel.createIndexes();
await AuditLogModel.createIndexes();
},
};