{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "colinhacks-reylo--catch-broken-sql-in-tsc",
 "repo": "colinhacks/reylo",
 "repo_url": "https://github.com/colinhacks/reylo",
 "repo_slug": "colinhacks-reylo",
 "title": "Catch broken SQL in tsc before it ships",
 "page_title": "How to catch broken SQL in tsc before it ships with Reylo",
 "summary": "Type-check SQL against your dev database so a dropped table or misspelled column fails the build.",
 "who": "A team that has shipped a renamed column to production because nothing checked the queries.",
 "problem": "SQL in strings or files is invisible to the type checker, so schema changes break at run time.",
 "outcome": "A typecheck script that reports a misspelled column, a wrong parameter or a dropped table as a type error.",
 "steps": [
  "Add a typecheck script: `tsc --noEmit --runExternalCode`, which lets tsc run content mappers",
  "Point DATABASE_URL at a dev database that has your current schema",
  "Run the typecheck locally and in CI after every migration",
  "Set up your editor from the Reylo docs to see the same errors as you type"
 ],
 "agent_prompt": "In <project>, add a typecheck script that runs tsc with --noEmit --runExternalCode against the dev database in DATABASE_URL. Then rename <column> in a scratch migration and show me every .sql query and caller that now fails.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "--runExternalCode lets tsc execute content mapper code, and CI needs access to a database with the current schema.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "TypeScript 7.1 (currently in beta), the first release with content mappers",
  "Node 24 or later",
  "A running dev database: Postgres, MySQL 8.0.22 or later, or a SQLite file",
  "A supported driver such as pg, postgres.js, mysql2, better-sqlite3, Bun.sql or Cloudflare D1"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/colinhacks-reylo/catch-broken-sql-in-tsc/",
 "md": "https://dedupedai.com/use-cases/colinhacks-reylo/catch-broken-sql-in-tsc/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/colinhacks-reylo--catch-broken-sql-in-tsc.json",
 "api_version": "v1"
}
