💻 Coding

Prisma Schema Relation Map from Schema Inventory (No Invented Model IDs)

Turn a Prisma schema inventory into a relation map only. No invented model IDs, migration hashes, or row counts beyond the inventory.

0.0
0Reviews
P
September 12, 2026

Prompt

Act as a Prisma schema architect who only uses a pasted schema inventory. You write a relation map the inventory already supports. You do not invent model IDs, migration hashes, row counts, or connection strings. This is not a live Prisma migrate sync and not a production cutover plan.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- Schema inventory I lock (model stubs, field cues, relation notes): [Inventory]
- Prisma / client version notes I lock: [Version]
- Project or workspace label I may quote (or UNKNOWN): [Workspace]
- Required model or relation names I may quote (or UNKNOWN): [SpecNames]
- Model names already present (or UNKNOWN): [ModelNames]
- Field labels already present (or UNKNOWN): [FieldLabels]
- Relation labels already present (or UNKNOWN): [RelationLabels]
- Words I must not use: [Banned]
- What I must never invent (model IDs, migration hashes, row counts, connection strings): [Never]
- Output format: [Format]
- Language: [Lang]

Generate:
1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, ModelNames, FieldLabels, RelationLabels, Lang. Forbidden: invented model IDs, migration hashes, row counts, connection strings. Banner: not a live Prisma migrate sync; not a production cutover plan.
2. Schema relation map table: one row per Inventory model stub or field cue. Missing relation notes write NOT IN INPUTS. Use Prisma models, fields, @relation, and datasource language when Inventory supports it. Quote ModelNames and FieldLabels only when present.
3. Spec name set: only names in SpecNames. Unnamed models stay NOT IN INPUTS. Never print model-ID or migration-hash VALUES not in Inventory.
4. Version lock: print Version. Refuse Prisma features newer than Version if Version is named.
5. Refuse list: inventing model IDs, inventing migration hashes, inventing row counts, inventing connection strings.
6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format.

Constraints:
- Map from Inventory only. No invented model-ID VALUES. Teach Prisma schema relation mapping, not a generic Drizzle or TypeORM swap.
- Honor Version. No emojis.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Generated Output

This image was generated using the prompt above.

Prisma Schema Relation Map from Schema Inventory (No Invented Model IDs) - Result

Examples

Example Input

Inventory: model Harbor Quay Cleat Order as pasted field cue id String as pasted relation note CleatLineItems as pasted; model River Ops Gate Sku as pasted field cue skuCode String as pasted. Model ID NOT IN INPUTS. Migration hash invent NONE.
Version: Prisma 5.19 as pasted (do not invent unreleased AI schema APIs)
Workspace: Harbor Quay Prisma Schema as pasted
SpecNames: Cleat Order as pasted; Gate Sku as pasted. User UNKNOWN.
ModelNames: Cleat Order as pasted; Gate Sku as pasted. Session UNKNOWN.
FieldLabels: id String as pasted; skuCode String as pasted. createdAt DateTime UNKNOWN.
RelationLabels: CleatLineItems as pasted. GateVendor UNKNOWN.
Banned: guaranteed row count, model id invent, migration invent, connection invent
Never: invent model IDs, invent migration hashes, invent row counts, invent connection strings
Format: ledger + table + specs + version + refuse + compliance
Lang: English

Example Output

1. Ledger. Inventory: model Harbor Quay Cleat Order field cue id String relation note CleatLineItems; model River Ops Gate Sku field cue skuCode String. Model ID NOT IN INPUTS. Migration hash invent NONE. Version Prisma 5.19. Workspace Harbor Quay Prisma Schema. SpecNames Cleat Order; Gate Sku; User UNKNOWN. ModelNames Cleat Order; Gate Sku; Session UNKNOWN. FieldLabels id String; skuCode String; createdAt DateTime UNKNOWN. RelationLabels CleatLineItems; GateVendor UNKNOWN. Lang English. Banner: not a live Prisma migrate sync; not a production cutover plan. Forbidden: invented model IDs, migration hashes, row counts, connection strings, guaranteed row count, model id invent, migration invent, connection invent.

2. Schema relation map.
1. Harbor Quay Cleat Order | model Cleat Order as pasted (ModelNames) | field id String as pasted (FieldLabels) | relation CleatLineItems as pasted (RelationLabels) | model ID NOT IN INPUTS | migration hash NONE | Prisma schema relation map only.
2. River Ops Gate Sku | model Gate Sku as pasted (ModelNames) | field skuCode String as pasted (FieldLabels) | relation note beyond CleatLineItems NOT IN INPUTS | model ID NOT IN INPUTS | migration hash NONE.
createdAt DateTime not printed beyond FieldLabels. GateVendor not invented beyond RelationLabels.

3. Spec name set. Cleat Order; Gate Sku as SpecNames. User UNKNOWN so write User NOT IN INPUTS. No model-ID VALUES beyond Inventory. No third model invented.

4. Version lock. Prisma 5.19 as pasted. Unreleased AI schema APIs not used. Datasource URL NOT IN INPUTS.

5. Refuse. Model-ID invent: refused. Migration invent: refused. Row-count invent: refused. Connection invent: refused. Guaranteed row count: refused.

6. Compliance. Banned hits none. Format ledger+table+specs+version+refuse+compliance. Gaps: User decision, Session ModelNames, createdAt FieldLabels, GateVendor RelationLabels, datasource path if any.

Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.

Reviews (0)

Please login to leave a review.
Loading reviews...