drizzle-kit up
This guide assumes familiarity with:
drizzle-kit up
command lets you upgrade drizzle schema snapshots to a newer version.
Itβs required whenever we introduce breaking changes to the json snapshots of the schema and upgrade the internal version.
drizzle-kit up
command requires you to specify both dialect
and database connection credentials,
you can provide them either via drizzle.config.ts config file or via CLI options
With config file
As CLI options
Multiple configuration files in one project
You can have multiple config files in the project, itβs very useful when you have multiple database stages or multiple databases on the same project:
npm
yarn
pnpm
bun
Extended list of configurations
We recommend configuring drizzle-kit
through drizzle.config.ts file,
yet you can provide all configuration options through CLI if necessary, e.g. in CI/CD pipelines, etc.
dialect | required | Database dialect you are using. Can be postgresql ,mysql or sqlite |
out | migrations folder, default=./drizzle | |
config | config file path, default=drizzle.config.ts |
npm
yarn
pnpm
bun