Feature Idea: Ability to Introspect Existing Postgres DB #4919
Replies: 1 comment
-
That would be a great tool! Using PayloadCMS with custom database schemas PayloadCMS is database-agnostic and offers official adapters for MongoDB, SQLite, and since version 2.0, also PostgreSQL (using Drizzle ORM with node-postgres). By default, Payload automatically manages and updates its own schema—potentially dropping or renaming tables/columns that it doesn’t recognize. However, you can preserve existing tables/data: |
Beta Was this translation helpful? Give feedback.
-
With drizzle being supported it would be great if there was a tool that utilized the introspect command (https://orm.drizzle.team/kit-docs/commands#introspect--pull) to generate a minimal payloadcms collection config based on an existing database.
Use case would be for those migrating from a different system or who have database schemas set up already. In combination with related roadmap item #4300, this feature would ease the difficulty involved with migrating an existing relational schema to PayloadCMS.
Beta Was this translation helpful? Give feedback.
All reactions