Skip to content

[FEATURE]: Feature Request: Support reverse syncing of schema changes from the database #4915

@SB2318

Description

@SB2318

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

📌 Context / Real-world Use Case

In real-world collaborative environments, it’s common for backend teams to make schema changes directly in the database — especially in legacy systems or teams migrating to Drizzle ORM.

  • As a developer using Drizzle, We need to manually reflect these changes in schema.ts.
  • Drizzle currently does not provide proper tooling to introspect or pull the current DB schema and generate Drizzle-compatible definitions.

🧪 What I Tried

  • Ran drizzle-kit push and generate, but Drizzle only looks at code changes and does not detect new tables from the live database.
  • Even running npx drizzle-kit studio helped only with visualizing tables but not auto-generating schema files.
  • Even there is pull command (like Prisma's prisma db pull) to generate schema from an existing database.

❌ Current Behavior

  • Drizzle completely ignores tables created or updated directly in the DB.
  • Developer has to manually re-type Drizzle schema even if the DB is the source of truth.

✅ Expected Behavior

  • A CLI command like:

    drizzle-kit introspect

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions