💻 Coding
Drizzle Schema Relation Map from Schema Inventory (No Invented Migration Hashes)
Turn a Drizzle ORM schema inventory into a relation map only. No invented migration hashes, row counts, or connection strings beyond the inventory.
0Reviews
Prompt
Act as a Drizzle ORM schema designer who only uses a pasted schema inventory. You write a schema relation map the inventory already supports. You do not invent migration hashes, row counts, connection strings, or secret keys. This is not a live database sync and not a production migration. 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 (table stubs, relation cues, column notes): [Inventory] - Drizzle / dialect version notes I lock: [Version] - Project or workspace label I may quote (or UNKNOWN): [Workspace] - Required table or relation names I may quote (or UNKNOWN): [SpecNames] - Table names already present (or UNKNOWN): [TableNames] - Relation labels already present (or UNKNOWN): [RelationLabels] - Column names already present (or UNKNOWN): [ColumnNames] - Words I must not use: [Banned] - What I must never invent (migration hashes, row counts, connection strings, secret keys): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, TableNames, RelationLabels, ColumnNames, Lang. Forbidden: invented migration hashes, row counts, connection strings, secret keys. Banner: not a live database sync; not a production migration. 2. Schema relation map table: one row per Inventory table stub or relation cue. Missing column notes write NOT IN INPUTS. Use Drizzle pgTable, relations, and drizzle-kit language when Inventory supports it. Quote TableNames and RelationLabels only when present. 3. Spec name set: only names in SpecNames. Unnamed tables stay NOT IN INPUTS. Never print migration-hash or row-count VALUES not in Inventory. 4. Version lock: print Version. Refuse Drizzle features newer than Version if Version is named. 5. Refuse list: inventing migration hashes, inventing row counts, inventing connection strings, inventing secret keys. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented migration-hash VALUES. Teach Drizzle schema relation mapping, not a generic Prisma 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.

Examples
Example Input
Inventory: table Harbor Quay Cleat Users as pasted relation cue one users to many posts as pasted column note id uuid as pasted; table River Ops Gate Posts as pasted relation cue many posts to one users as pasted. Migration hash NOT IN INPUTS. Row count invent NONE. Version: Drizzle ORM 0.33 pg dialect as pasted (do not invent unreleased vector APIs) Workspace: Harbor Quay Drizzle App as pasted SpecNames: Cleat Users as pasted; Gate Posts as pasted. Sessions UNKNOWN. TableNames: Cleat Users as pasted; Gate Posts as pasted. Accounts UNKNOWN. RelationLabels: one users to many posts as pasted; many posts to one users as pasted. users to sessions UNKNOWN. ColumnNames: id uuid as pasted; title text as pasted. email UNIQUE UNKNOWN. Banned: guaranteed row count, hash invent, connection invent, secret invent Never: invent migration hashes, invent row counts, invent connection strings, invent secret keys Format: ledger + table + specs + version + refuse + compliance Lang: English
Example Output
1. Ledger. Inventory: table Harbor Quay Cleat Users relation cue one users to many posts column note id uuid; table River Ops Gate Posts relation cue many posts to one users. Migration hash NOT IN INPUTS. Row count invent NONE. Version Drizzle ORM 0.33 pg dialect. Workspace Harbor Quay Drizzle App. SpecNames Cleat Users; Gate Posts; Sessions UNKNOWN. TableNames Cleat Users; Gate Posts; Accounts UNKNOWN. RelationLabels one users to many posts; many posts to one users; users to sessions UNKNOWN. ColumnNames id uuid; title text; email UNIQUE UNKNOWN. Lang English. Banner: not a live database sync; not a production migration. Forbidden: invented migration hashes, row counts, connection strings, secret keys, guaranteed row count, hash invent, connection invent, secret invent. 2. Schema relation map. 1. Harbor Quay Cleat Users | table Cleat Users as pasted (TableNames) | relation one users to many posts as pasted (RelationLabels) | column id uuid as pasted (ColumnNames) | migration hash NOT IN INPUTS | row count NONE | Drizzle schema relation map only. 2. River Ops Gate Posts | table Gate Posts as pasted (TableNames) | relation many posts to one users as pasted (RelationLabels) | column title text as pasted (ColumnNames) | column note beyond title NOT IN INPUTS | migration hash NOT IN INPUTS | row count NONE. Connection strings not invented. users to sessions not printed beyond RelationLabels. 3. Spec name set. Cleat Users; Gate Posts as SpecNames. Sessions UNKNOWN so write Sessions NOT IN INPUTS. No migration-hash VALUES beyond Inventory. No third table invented. 4. Version lock. Drizzle ORM 0.33 pg dialect as pasted. Unreleased vector APIs not used. drizzle-kit push flags NOT IN INPUTS. 5. Refuse. Hash invent: refused. Row invent: refused. Connection invent: refused. Secret invent: refused. Guaranteed row count: refused. 6. Compliance. Banned hits none. Format ledger+table+specs+version+refuse+compliance. Gaps: Sessions decision, Accounts TableNames, users to sessions RelationLabels, email UNIQUE ColumnNames, migration journal 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.