ReviewOS

stacks/bun-query-builder

Live-DB schema introspection → defineModel codegen (the 'pull' workflow)

#1047
Closed glennmichael123 opened this 22 days ago · 0 comments
22 days ago

Summary

The introspect action is currently a stub that only re-reads local model files. But the live-schema reads already exist: db-info.ts queries information_schema.columns/statistics and SQLite PRAGMA table_info/index_list; inspect.ts reads constraints. Reuse those to emit defineModel stubs from an existing database (the Knex/Drizzle "pull" workflow).

Effort: M (SQL already written; net-new is the model-codegen step). Location: src/actions/introspect.ts, db-info.ts, inspect.ts. Found via internal code audit.

Sign in to comment on this issue.