Skip to content

Drizzle ORM

pgmold supports loading schemas from Drizzle ORM config files using the drizzle: prefix.

Terminal window
# Use Drizzle schema as source
pgmold plan \
--schema drizzle:drizzle.config.ts \
--database db:postgres://localhost/mydb

pgmold runs drizzle-kit export internally to extract the SQL DDL from your Drizzle config.

Combine SQL files and Drizzle schemas:

Terminal window
pgmold plan \
--schema sql:base.sql \
--schema drizzle:drizzle.config.ts \
--database db:postgres://localhost/mydb

This merges both sources into a single desired schema before diffing against the database.