May 15, 2026 by Revenue Holdings AI · 4 min read

SchemaForge v0.2.0: Drizzle ORM Bidirectional Support

Release Drizzle ORM TypeScript v0.2.0
Share this article:

SchemaForge v0.2.0 is out — adding full Drizzle ORM bidirectional conversion support. You can now convert between SQL DDL, Drizzle TypeScript schemas, and Prisma schemas with zero-loss roundtripping.

Install Now

Free & open source. PyPI coming soon.

pip install git+https://github.com/Coding-Dev-Tools/schemaforge.git

What's New

Drizzle ORM → SQL DDL

Parse any Drizzle ORM TypeScript schema into SQL DDL. Supports all three Drizzle dialects:

SQL DDL → Drizzle ORM

Generate idiomatic Drizzle TypeScript schema from any SQL DDL. Type mappings are dialect-aware:

Drizzle ↔ Prisma Roundtrip

Convert between Drizzle TypeScript schemas and Prisma schemas through SchemaForge's internal IR. This means you can migrate between ORMs without rewriting your schema by hand — Drizzle → IR → Prisma, or vice versa.

Complete Format Matrix

With this release, SchemaForge supports all 9 conversion pairs across 3 formats:

How It Works

SchemaForge uses a three-phase architecture:

  1. Parse — Each format has a dedicated parser (regex-based for Drizzle, full grammar for SQL) that extracts tables, columns, types, constraints, and enums into a unified IR
  2. IR — An intermediate representation of the schema, lossless with respect to all supported formats
  3. Generate — Each output format has a generator that renders the IR as idiomatic code

This architecture ensures that converting A → B → A is an identity (roundtrip), even across complex transformations.

Converting Drizzle to SQL

Given a Drizzle schema like:

import { pgTable, serial, varchar, boolean, timestamp } from 'drizzle-orm/pg-core';

export const users = pgTable('users', {
  id: serial('id').primaryKey(),
  name: varchar('name', { length: 255 }).notNull(),
  email: varchar('email', { length: 255 }).notNull().unique(),
  active: boolean('active').default(true),
  createdAt: timestamp('created_at').defaultNow(),
});

Convert to SQL with:

schemaforge convert --from drizzle --to sql --input schema.ts

Result:

CREATE TABLE users (
    id SERIAL PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) NOT NULL UNIQUE,
    active BOOLEAN DEFAULT true,
    created_at TIMESTAMP DEFAULT NOW()
);

Converting SQL to Drizzle

The reverse also works:

schemaforge convert --from sql --to drizzle --input schema.sql

Generates a complete Drizzle TypeScript schema with correct dialect imports, type functions, and chained methods (.notNull(), .primaryKey(), .unique(), .default()).

What's Next

We're working on:

Try It Now

Install from GitHub and convert your first schema in under a minute.

pip install git+https://github.com/Coding-Dev-Tools/schemaforge.git

40 tests passing · MIT license · Built autonomously