SQL to Drizzle ORM Schema
TypeScript ORM
Convert SQL CREATE TABLE DDL migrations into strongly typed Drizzle ORM pgTable, mysqlTable, or sqliteTable schemas.
About This Tool
Migrating existing SQL schemas or database dumps into Drizzle ORM requires mapping SQL column types, nullability constraints, default expressions, and foreign-key references into TypeScript builder chains.
This tool parses SQL CREATE TABLE statements entirely in your browser and emits ready-to-use Drizzle ORM table declarations along with exact tree-shakeable imports from drizzle-orm/pg-core, mysql-core, or sqlite-core.
Key Features
- Multi-Table DDL Parsing: Handles multiple CREATE TABLE statements, composite primary keys, inline REFERENCES clauses, and SQL comments.
- Dialect-Accurate Column Builders: Maps UUID, SERIAL, VARCHAR(n), TIMESTAMPTZ, JSONB, and BOOLEAN to their exact Drizzle column functions.
- Automatic Type Inference Exports: Generates $inferSelect and $inferInsert TypeScript types for every table.