Skip to content

[Feature Request]: Real-time ORM Definition Generation in Schema Designer #21858

@yoleichen

Description

@yoleichen

Feature Description

When users propose or accept schema changes in Schema Designer, the extension should generate ORM-ready artifacts that accurately reflect the updated schema’s tables, columns, and relationships.

Like the existing T-SQL Definition feature, these ORM scripts must be produced directly from the canonical schema model and update live as the user edits the schema (real-time refresh during design).

Supported ORM targets:

  • Prisma
  • Sequelize
  • TypeORM
  • Drizzle ORM
  • SQLAlchemy
  • EF Core

Design mock:

Image

Example Prisma output:

// Created by GitHub Copilot in VS Code MSSQL - review carefully before executing

// schema.prisma
model Categories {
  categoryID  Int       @id @default(autoincrement())
  name        String    @db.NVarChar(100)
  description String?   @db.NVarChar(500)
  
  products    Products[]
  
  @@map("dbo.Categories")
}

model Products {
  productID  Int        @id @default(autoincrement())
  name       String     @db.NVarChar(100)
  price      Decimal    @db.Decimal(10, 2)
  categoryID Int?
  
  category   Categories? @relation(fields: [categoryID], references: [categoryID])
  
  @@map("dbo.Products")
}

Problem and Motivation

Problem:
Today, Schema Designer can show an authoritative, up-to-date T-SQL definition for proposed/accepted schema changes, but developers who build applications with ORMs still have a major gap:

  • They can visually design the database schema, but they can’t immediately see the equivalent ORM model code (e.g., Prisma models, EF Core entities, SQLAlchemy models).
  • Translating a designed schema into ORM code is manual, repetitive, and error-prone, especially around relationships, nullability and defaults, data type mapping (e.g., NVARCHAR/DECIMAL precision), naming and table mapping (schema/table/column maps)
  • During iterative design, ORM definitions quickly become stale because they’re not derived from the same canonical schema representation that powers Schema Designer.

This creates friction between “database-first” design and “application-first” development, and slows down delivery of reliable migrations.

Motivation / Why it matters
Many data-driven apps use ORMs across multiple ecosystems. Supporting Prisma, Sequelize, TypeORM, Drizzle, SQLAlchemy, and EF Core covers common Node.js, Python, and .NET workflows. This makes Schema Designer more useful as a daily driver for developers, not just a database visualization or design tool.

Having this feature also enables faster, safer migrations. Generating ORM scripts directly from the canonical schema model enables confidence that ORM code matches the migration intent (source-of-truth alignment). Developers can spot breaking changes immediately (e.g., making a field required, changing precision, modifying keys).

Related Area

  • Connection dialog (SQL Server | Azure browse/Fabric browse)
  • Query editor
  • Query results panel
  • Object Explorer
  • GitHub Copilot integration
  • Preview/Edit data
  • Table Designer
  • Schema Designer
  • Schema Compare
  • Local SQL Server Container provisioning
  • SQL database in Fabric provisioning
  • DACPAC/BACPAC export/import
  • SQL Database projects
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the area

No response

Confirmation

  • I have searched existing feature requests and couldn't find a match
  • I want to help implement this feature

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions