v0.2.0 — Drizzle ORM bidirectional support
·
157 commits
to master
since this release
v0.2.0 — Drizzle ORM Bidirectional Support
New
- Drizzle ORM schema → SQL: parse pgTable/mysqlTable/sqliteTable definitions
- SQL → Drizzle ORM schema: generate TypeScript with type-correct column mappings
- Drizzle ↔ Prisma roundtrip: convert between both ORMs via the internal IR
- Supports: pgEnum, serial/bigserial, varchar/text, timestamp/date/time, JSONB/UUID, default values, primary keys, .notNull(), .unique()
- Dialect-aware: pg, mysql, sqlite table factory functions
Fixed
- Drizzle parser/generator were implemented but not registered in the conversion registry (_registry dict), causing all Drizzle-related conversions to raise ValueError("Unsupported format") — now properly imported and registered
Technical
- DrizzleParser: regex-based TypeScript schema parser (handles nested braces, string literals, comments)
- DrizzleGenerator: outputs idiomatic Drizzle ORM schema with runtime-overridable dialect
- 4 new tests: SQL→Drizzle, Drizzle→SQL, Drizzle→Prisma, Prisma→Drizzle (all passing)
- 40/40 tests passing