1.6 KiB
1.6 KiB
Prisma Schema Fix Progress
Current Status
We've made significant progress fixing Prisma schema validation errors, reducing from 27+ errors down to 15 remaining errors.
Fixed ✅
- All
@map→@@mapsyntax errors - Removed duplicate models
- Removed references to missing models
- Fixed SyntheticGruBond relations
- Fixed InterplanetaryNode relations (sourceRelayGrids, targetRelayGrids, sourceSettlements, targetSettlements)
- Fixed GovernanceTier relations (fromDelegations, toDelegations)
- Removed conflicting redundant relations
Remaining Issues (15 errors)
These require careful analysis because some relations may be implicit (one-to-many where Prisma infers the back-relation) vs explicit (requiring named relation on both sides):
- SovereignBank.ledgerEntries → LedgerEntry (but LedgerEntry doesn't have sovereignBankId field)
- BondMarketParticipant.sovereignBank → SovereignBank (needs relation name match)
- GruIssuance relations (allocation, settlementPipeline, entity)
- GruReserveAllocation relations (reserveClass, pool)
- GruReservePool relations (allocations)
- GruIssuanceApplication.issuance (needs fields/references)
- One-to-one relation constraints (decisionId, gapId need @unique)
- Constraint name conflicts (gru_issuances__fkey)
Some of these may require:
- Adding missing foreign key fields
- Adding @unique constraints
- Using different relation names to avoid conflicts
- Removing relations that shouldn't exist
The schema is significantly closer to validation - from 27+ errors down to 15.