You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
site: regenerate demo schema with Relation helpers (#96)
Ran `npm run migrate && tg generate` against the demo DDL — these files
hadn't been regenerated since Relation.belongsTo/.has landed, so the
playground was showing older output than `tg generate` produces today
(and than the README and examples/basic already show).
Two changes fall out of the regen:
- relations collapse to Relation.has / Relation.belongsTo
- columns lose the type-argument form: (Int8<1>).column() -> Int8.column()
The `Relation` import is added by hand. `updateBlock` byte-preserves
everything before @generated-start (deliberately — it protects
hand-added imports like Connection in orders.ts), while
buildImportLines only runs from emitNewFile. So an existing file gains
Relation.* call sites without ever gaining the import, and codegen
output doesn't compile until the import is added. Left as-is here; the
generator needs a separate fix that merges managed symbols into the
existing typegres specifier.
Verified: astro check 0 errors, site vitest 17/17.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments