Update dependency drizzle-kit to ^0.23.0 #93
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.23.0
Release Notes
drizzle-team/drizzle-kit-mirror (drizzle-kit)
v0.23.0
Compare Source
v0.22.8
: 0.22.8Compare Source
v0.22.7
Compare Source
v0.22.6
: 0.22.6Compare Source
drizzle-kit up
of snapshots from v6 to v7v0.22.5
: 0.22.5Compare Source
v0.22.4
: 0.22.4Compare Source
data loss
triggers onpush
when adding aNOT NULL
constraint to a column and when removing thedefault
value from a column. These actions will now be performed immediately, and if there are anyNULL
values in the column, you will receive an error from the databasev0.22.3
: 0.22.3Compare Source
Cannot use 'in' operator to search for 'default' in undefined
error on push and generatev0.22.2
: 0.22.2Compare Source
,
. This should fix problems fortsvector
indexes, such as:v0.22.1
: 0.22.1Compare Source
Bug fixes
Improvements
π Drizzle Studio now supports raw responses from D1 HTTP. This means that Drizzle Studio now has full support for D1, and all queries should work as expected!
π Refactor the d1-http driver to properly show the table row count
v0.22.0
: 0.22.0Compare Source
New Features
π Full support for indexes in PostgreSQL
The previous Drizzle+PostgreSQL indexes API was incorrect and was not aligned with the PostgreSQL documentation. The good thing is that it was not used in queries, and drizzle-kit didn't support all properties for indexes. This means we can now change the API to the correct one and provide full support for it in drizzle-kit
Previous API
.on
..using
and.on
in our case are the same thing, so the API is incorrect here..asc()
,.desc()
,.nullsFirst()
, and.nullsLast()
should be specified for each column or expression on indexes, but not on an index itself.Current API
π Support for new types
Drizzle Kit can now handle:
point
andline
from PostgreSQLvector
from the PostgreSQLpg_vector
extensiongeometry
from the PostgreSQLPostGIS
extensionπ New param in drizzle.config -
extensionsFilters
The PostGIS extension creates a few internal tables in the
public
schema. This means that if you have a database with the PostGIS extension and usepush
orintrospect
, all those tables will be included indiff
operations. In this case, you would need to specifytablesFilter
, find all tables created by the extension, and list them in this parameter.We have addressed this issue so that you won't need to take all these steps. Simply specify
extensionsFilters
with the name of the extension used, and Drizzle will skip all the necessary tables.Currently, we only support the
postgis
option, but we plan to add more extensions if they create tables in thepublic
schema.The
postgis
option will skip thegeography_columns
,geometry_columns
, andspatial_ref_sys
tablesImprovements
π Update zod schemas for database credentials and write tests to all the positive/negative cases
π Support full set of SSL params in kit config, provide types from node:tls connection
π Normilized SQLite urls for
libsql
andbetter-sqlite3
driversThose drivers have different file path patterns, and Drizzle Kit will accept both and create a proper file path format for each
π Updated MySQL and SQLite index-as-expression behavior
In this release MySQL and SQLite will properly map expressions into SQL query. Expressions won't be escaped in string but columns will be
Bug Fixes
How
push
andgenerate
works for indexesLimitations
You should specify a name for your index manually if you have an index on at least one expression
Example
Push won't generate statements if these fields(list below) were changed in an existing index:
.on()
and.using()
.where()
statements.op()
on columnsIf you are using
push
workflows and want to change these fields in the index, you would need to:For the
generate
command,drizzle-kit
will be triggered by any changes in the index for any property in the new drizzle indexes API, so there are no limitations here.v0.21.4
Compare Source
bug fixes
node-pg
pool connection halting, regression introduced in previous release while migrating fromclient
topool
with max 1 connectionv0.21.3
Compare Source
Cloudflare D1 HTTP API support π
Drizzle Chrome Extension now has support for Cloudflare D1!
Drizzle Kit now lets you run
migrate
,push
,introspect
andstudio
commands using Cloudflare D1 HTTP API, you just need to update connection params indrizzle.config.ts
:You can find
accountId
,databaseId
andtoken
in Cloudflare dashboardTo get
accountId
go to Workers & Pages -> Overview -> copy Account ID from the right sidebarTo get
databaseId
open D1 database you want to connect to and copy Database IDTo get
token
go to My profile -> API Tokens and create token with D1 edit permissionsBug fixes
check
command #β2284postgres
dialect #β2346v0.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
Drizzle Studio support for per-database preferences
When connecting to different databases with Drizzle Local Studio, we will store all preferences such as selected tabs, hidden columns, pagination, etc., separately for each database
Drizzle Studio support for advanced bug report context
Now you can assist us in debugging Drizzle Studio errors. No more need to say, "Please share your schema with us"; just click a button, download the bug report, and send it to us!
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.Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» 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.