Skip to content
manual

Drizzle ORM ​

Baseline uses Drizzle ORM for data mapping and schema evolution. Baseline encourages the codebase-first workflow.

WARNING

MySQL Only

Baseline currently only supports MySQL. Support for other databases (e.g., PostgreSQL) is not available at this time.

Drizzle ORM follows a codebase-first philosophy. It avoids proprietary schema languages and heavy, generated files, ensuring your database schema remains the "source of truth" directly within your JavaScript files.

Key Features ​

  • Automated Migrations: Drizzle generates migrations by calculating the difference between your JavaScript schema and the existing database state.
  • Seamless Validation: Drizzle provides native-feeling integration for validation, bridging the gap between your schema and application logic.

Why not Prisma? ​

While Prisma is a popular choice, Drizzle ORM was chosen to minimize development friction, adhering to the baseline Philosophy.

ConstraintPrismaDrizzle
Client GenerationGenerates a heavy client, requiring rebuilds for every schema change.Uses standard JavaScript, but lacks autocomplete/IntelliSense.
Schema FormatUses a proprietary DSL, making custom tooling difficult.Uses standard JavaScript, which allows Baseline to offer streamlined helpers.
ValidationOften requires third-party packages to bridge the schema and validation gap.Provides native-feeling integration via "Zod".