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>
50 lines
3.2 KiB
SQL
50 lines
3.2 KiB
SQL
/*
|
|
Warnings:
|
|
|
|
- A unique constraint covering the columns `[transactionNumber]` on the table `BudgetTransaction` will be added. If there are existing duplicate values, this will fail.
|
|
- Added the required column `amount` to the `BudgetTransaction` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `category` to the `BudgetTransaction` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `date` to the `BudgetTransaction` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `transactionNumber` to the `BudgetTransaction` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `type` to the `BudgetTransaction` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `companyName` to the `EmploymentRecord` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `position` to the `EmploymentRecord` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `startDate` to the `EmploymentRecord` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `type` to the `HealthRecord` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `eventDate` to the `PopulationDynamic` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `residentName` to the `PopulationDynamic` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `type` to the `PopulationDynamic` table without a default value. This is not possible if the table is not empty.
|
|
|
|
*/
|
|
-- AlterTable
|
|
ALTER TABLE "BudgetTransaction" ADD COLUMN "amount" DOUBLE PRECISION NOT NULL,
|
|
ADD COLUMN "category" TEXT NOT NULL,
|
|
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
ADD COLUMN "date" TIMESTAMP(3) NOT NULL,
|
|
ADD COLUMN "description" TEXT,
|
|
ADD COLUMN "transactionNumber" TEXT NOT NULL,
|
|
ADD COLUMN "type" TEXT NOT NULL;
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "EmploymentRecord" ADD COLUMN "companyName" TEXT NOT NULL,
|
|
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
ADD COLUMN "endDate" TIMESTAMP(3),
|
|
ADD COLUMN "isActive" BOOLEAN NOT NULL DEFAULT true,
|
|
ADD COLUMN "position" TEXT NOT NULL,
|
|
ADD COLUMN "startDate" TIMESTAMP(3) NOT NULL;
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "HealthRecord" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
ADD COLUMN "notes" TEXT,
|
|
ADD COLUMN "type" TEXT NOT NULL;
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "PopulationDynamic" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
ADD COLUMN "description" TEXT,
|
|
ADD COLUMN "eventDate" TIMESTAMP(3) NOT NULL,
|
|
ADD COLUMN "residentName" TEXT NOT NULL,
|
|
ADD COLUMN "type" TEXT NOT NULL;
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "BudgetTransaction_transactionNumber_key" ON "BudgetTransaction"("transactionNumber");
|