pgschema
pgschema copied to clipboard
Using in collaboration with drizzle-orm
Very interesting project!
I'm using Drizzle ORM for my schema migration, I'm wondering if pgschema would bring any benefit? Could it be used in collaboration with the tool, or would it replace Drizzle migrations?
Workflow
- Edit drizzle file locally.
drizzle-kit exportto export the full sql schemaschema.sqlpgschema plan --file schema.sql --db xxx, this use schema.sql as the desired schema, and pgschema then generates the plan to migrate the target db schema toschema.sqlpgschema apply --plan plan.jsonto apply the migration
@tianzhou really cool! And what advantage does this bring? is the pgschema migration "safer"?
- Online DDL https://www.pgschema.com/workflow/online-ddl
- Concurrent migration detection https://www.pgschema.com/workflow/plan-review-apply#detect-concurrent-changes-with-fingerprinting
Thanks!