feat(db): migration mekanizması ve ilk index migration'ı
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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();
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user