[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:
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[reportNumber]` on the table `SecurityReport` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `location` to the `Posyandu` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `name` to the `Posyandu` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `schedule` to the `Posyandu` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `type` to the `Posyandu` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `updatedAt` to the `Posyandu` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `description` to the `SecurityReport` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `reportNumber` to the `SecurityReport` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `reportedBy` to the `SecurityReport` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `title` to the `SecurityReport` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `updatedAt` to the `SecurityReport` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Posyandu" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
ADD COLUMN "location" TEXT NOT NULL,
|
||||
ADD COLUMN "name" TEXT NOT NULL,
|
||||
ADD COLUMN "schedule" TEXT NOT NULL,
|
||||
ADD COLUMN "type" TEXT NOT NULL,
|
||||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "SecurityReport" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
ADD COLUMN "description" TEXT NOT NULL,
|
||||
ADD COLUMN "location" TEXT,
|
||||
ADD COLUMN "reportNumber" TEXT NOT NULL,
|
||||
ADD COLUMN "reportedBy" TEXT NOT NULL,
|
||||
ADD COLUMN "status" TEXT NOT NULL DEFAULT 'BARU',
|
||||
ADD COLUMN "title" TEXT NOT NULL,
|
||||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "SecurityReport_reportNumber_key" ON "SecurityReport"("reportNumber");
|
||||
Reference in New Issue
Block a user