build(deps): update dependency drizzle-kit to v0.21.2 #730
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.20.17
->0.21.2
Release Notes
drizzle-team/drizzle-kit-mirror (drizzle-kit)
v0.21.2
Compare Source
Bug fixes
A list of regressions after
0.21.0
that were fixed (there are more, and those should be fixed in the next patch releases):generate
andpush
were not detecting new columns added.push
Tickets that were closed
v0.21.1
Compare Source
v0.21.0
Compare Source
Breaking changes
β Snapshots Upgrade
All PostgreSQL and SQLite-generated snapshots will be upgraded to version 6. You will be prompted to upgrade them by running
drizzle-kit up
β Removing :dialect from
drizzle-kit
cli commandsYou can now just use commands, like:
drizzle-kit generate
drizzle-kit push
without specifying dialect. This param is moved to
drizzle.config.ts
β
drizzle.config
updatedialect
is now mandatory; specify which database dialect you are connecting to. Options includemysql
,postgresql
, orsqlite
.driver
has become optional and will have a specific driver, each with a different configuration ofdbCredentials
. Available drivers are:aws-data-api
turso
d1-http
- currently WIPexpo
url
- a unified parameter for the previously existingconnectionString
anduri
.migrations
- a new object parameter to specify a custom table and schema for the migrate command:table
- the custom table where drizzle will store migrations.schema
- the custom schema where drizzle will store migrations (Postgres only).Usage examples for all new and updated commands
Drizzle driver selection follows the current strategy:
If a
driver
is specified, use this driver for querying.If no driver is specified:
For
postgresql
dialect, Drizzle will:pg
driver is installed and use it.postgres
driver and use it.@vercel/postgres
.@neondatabase/serverless
.For
mysql
dialect, Drizzle will:mysql2
driver is installed and use it.@planetscale/database
and use it.For
sqlite
dialect, Drizzle will:@libsql/client
driver is installed and use it.better-sqlite3
and use it.β MySQL schemas/database are no longer supported by drizzle-kit
Drizzle Kit won't handle any schema changes for additional schemas/databases in your drizzle schema file
New Features
π Pull relations
Drizzle will now pull
relations
from the database by extracting foreign key information and translating it into arelations
object. You can view therelations.ts
file in theout
folder after introspection is completeFor more info about relations, please check the docs
π Custom name for generated migrations
To specify a name for your migration you should use
--name <name>
Usage
π New command
migrate
You can now apply generated migrations to your database directly from
drizzle-kit
Usage
By default, drizzle-kit will store migration data entries in the
__drizzle_migrations
table and, in the case of PostgreSQL, in adrizzle
schema. If you want to change this, you will need to specify the modifications indrizzle.config.ts
.How to migrate from
0.20.18
to0.21.0
1. Remove all
:dialect
prefixes from your Drizzle-Kit commands.Example: Change
drizzle-kit push:mysql
todrizzle-kit push
.2. Update your
drizzle.config.ts
file:dialect
todrizzle.config.ts
. It is now mandatory and can be 'postgresql', 'mysql', or 'sqlite'.driver
todrizzle.config.ts
ONLY if you are usingaws-data-api
,turso
,d1-http
(WIP), orexpo
. Otherwise, you can remove thedriver
fromdrizzle.config.ts
.connectionString
oruri
indbCredentials
, you should now useurl
.3. If you are using PostgreSQL and had migrations generated in your project, please run
drizzle-kit up
so Drizzle can upgrade all the snapshots to version 6.v0.20.18
Compare Source
Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Enabled.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.