Release

SchemaForge v0.5.0: SQLAlchemy Support

Bidirectional conversion between SQLAlchemy declarative models and 5 other ORM formats — Prisma, Drizzle, TypeORM, Django, and SQL DDL — all from a single CLI.
May 15, 2026 · 4 min read · DevForge
Share this article:

We're excited to announce SchemaForge v0.5.0, adding full SQLAlchemy declarative model support. This completes the set: SchemaForge now converts bidirectionally between all six major ORM formats with roundtrip verification of supported schema elements. Foreign keys and ORM relationships are not preserved by the current converter.

┌─────────────────────────────────────────────────────┐ │ SchemaForge v0.5.0 │ │ (6 formats) │ │ │ │ SQL DDL ←→ Prisma ←→ Drizzle ←→ TypeORM │ │ ↕ ↕ ↕ ↕ │ │ Django ←→ SQLAlchemy (🆕 v0.5.0) │ │ ↕ ↕ ↕ ↕ │ │ Every format ↔ Every other format │ └─────────────────────────────────────────────────────┘

What's New in v0.5.0

💡 v0.5.0 is a free upgrade. pip install --upgrade git+https://github.com/Coding-Dev-Tools/schemaforge.git and you're done.

SQLAlchemy → Prisma in One Command

Here's the kind of migration SchemaForge now handles. Say you have a SQLAlchemy model:

# models.py
from sqlalchemy import Column, Integer, String, Boolean, ForeignKey, DateTime
from sqlalchemy.orm import declarative_base, relationship
from datetime import datetime

Base = declarative_base()

class User(Base):
    __tablename__ = "users"

    id = Column(Integer, primary_key=True)
    email = Column(String(255), unique=True, nullable=False)
    name = Column(String(100), nullable=False)
    is_active = Column(Boolean, default=True)
    created_at = Column(DateTime, default=datetime.utcnow)
    posts = relationship("Post", back_populates="author")

class Post(Base):
    __tablename__ = "posts"

    id = Column(Integer, primary_key=True)
    title = Column(String(200), nullable=False)
    body = Column(String, nullable=False)
    published = Column(Boolean, default=False)
    author_id = Column(Integer, ForeignKey("users.id"))
    author = relationship("User", back_populates="posts")

Convert to Prisma. The scalar columns remain; foreign-key constraints and ORM relationships in the input are dropped. Review the output before applying it:

$ schemaforge convert --from sqlalchemy --to prisma --input models.py
model User {
  id         Int      @id @default(autoincrement())
  email      String   @unique
  name       String
  is_active  Boolean  @default(true)
  created_at DateTime @default(now())
}

model Post {
  id         Int      @id @default(autoincrement())
  title      String
  body       String
  published  Boolean  @default(false)
  author_id  Int
}

Or to Drizzle:

$ schemaforge convert --from sqlalchemy --to drizzle --input models.py
import { pgTable, serial, varchar, boolean, timestamp, integer } from "drizzle-orm/pg-core";

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

export const posts = pgTable("posts", {
  id: serial("id").primaryKey(),
  title: varchar("title", { length: 200 }).notNull(),
  body: varchar("body").notNull(),
  published: boolean("published").default(false),
  authorId: integer("author_id"),
});

Or to Django models, TypeORM entities, or SQL DDL — all with the same command pattern.

Conversion Matrix

All 30 direction pairs now work:

→ SQL→ Prisma→ Drizzle→ TypeORM→ Django→ SQLAlchemy
SQL DDL →—✓✓✓✓✓
Prisma →✓—✓✓✓✓
Drizzle →✓✓—✓✓✓
TypeORM →✓✓✓—✓✓
Django →✓✓✓✓—✓
SQLAlchemy →✓✓✓✓✓—

Schema Diffing

v0.5.0 also includes schema diffing — compare two schemas in the same format to see what changed:

$ schemaforge diff schema-v1.prisma schema-v2.prisma
═══ Schema Diff ═══

Added:
  table "categories" (id, name, slug)

Modified:
  table "posts"
    + column "category_id" (Int, nullable)
    ~ column "body": String(200) → Text

Removed:
  column "posts.is_pinned"

Demo Fixtures

Want to try it right now? The repo includes a blog schema in all 6 formats:

$ pip install git+https://github.com/Coding-Dev-Tools/schemaforge.git $ git clone https://github.com/Coding-Dev-Tools/schemaforge.git $ cd schemaforge/fixtures $ schemaforge convert --from sql --to prisma --input sample.sql $ schemaforge convert --from prisma --to django --input sample.prisma $ schemaforge convert --from typeorm --to drizzle --input sample.typeorm.ts

No need to understand Prisma syntax to get Django models — SchemaForge does the translation.


Release Notes Summary

FeatureStatus
SQLAlchemy declarative model parser✅ v0.5.0
SQLAlchemy declarative model generator✅ v0.5.0
Demo fixtures in all 6 formats✅ v0.5.0
Schema diff command✅ v0.2.0
Batch directory conversion✅ v0.2.0
40+ passing tests✅ v0.5.0
30 bidirectional conversion paths✅ v0.5.0

Next Steps

Try SchemaForge today — it's free and open source (Apache 2.0):

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

Read the original v0.2.0 launch post for more on Drizzle support and batch conversion.

SchemaForge is one of 11 tools in the DevForge suite. Check out the others:

Read the full docs →

Stay Updated

Get notified about new releases and tutorials.