[darmasaba-dashboard][2026-03-27] feat: complete all seeders and update Phase 2 schema

Schema Updates:
- Added fields to Umkm model (name, owner, productType, description, timestamps)
- Added fields to Posyandu model (name, location, schedule, type, timestamps)
- Added fields to SecurityReport model (reportNumber, title, description, location, reportedBy, status, timestamps)
- Added fields to EmploymentRecord model (companyName, position, startDate, endDate, isActive, timestamps)
- Added fields to PopulationDynamic model (type, residentName, eventDate, description, timestamps)
- Added fields to BudgetTransaction model (transactionNumber, type, category, amount, description, date, timestamps)
- Added fields to HealthRecord model (type, notes, timestamps)

New Seeders:
- seed-discussions.ts: Documents, Discussions, DivisionMetrics
- seed-phase2.ts: UMKM, Posyandu, SecurityReports, EmploymentRecords, PopulationDynamics, BudgetTransactions

Enhanced Seeders:
- seed-auth.ts: Added seedApiKeys() function
- seed-public-services.ts: Added seedComplaintUpdates() and getComplaintIds()

New NPM Scripts:
- seed:documents - Seed documents and discussions
- seed:phase2 - Seed Phase 2+ features

All 33 Prisma models now have seeder coverage (82% direct, 12% stubs, 6% auto-managed)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-03-27 14:05:15 +08:00
parent 44b6b158ef
commit c216fa074d
10 changed files with 762 additions and 33 deletions

View File

@@ -0,0 +1,15 @@
/*
Warnings:
- Added the required column `name` to the `Umkm` table without a default value. This is not possible if the table is not empty.
- Added the required column `owner` to the `Umkm` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `Umkm` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Umkm" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "description" TEXT,
ADD COLUMN "name" TEXT NOT NULL,
ADD COLUMN "owner" TEXT NOT NULL,
ADD COLUMN "productType" TEXT,
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;