build(deps): update dependency drizzle-orm to ^0.30.0 #199
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.29.3
->^0.30.0
Release Notes
drizzle-team/drizzle-orm (drizzle-orm)
v0.30.0
Compare Source
Breaking Changes
The Postgres timestamp mapping has been changed to align all drivers with the same behavior.
❗ We've modified the
postgres.js
driver instance to always return strings for dates, and then Drizzle will provide you with either strings of mapped dates, depending on the selectedmode
. The only issue you may encounter is that once you provide the `postgres.js`` driver instance inside Drizzle, the behavior of this object will change for dates, which will always be strings.We've made this change as a minor release, just as a warning, that:
If you were using timestamps and were waiting for a specific response, the behavior will now be changed.
When mapping to the driver, we will always use
.toISOString
for both timestamps with timezone and without timezone.If you were using the
postgres.js
driver outside of Drizzle, allpostgres.js
clients passed to Drizzle will have mutated behavior for dates. All dates will be strings in the response.Parsers that were changed for
postgres.js
.Ideally, as is the case with almost all other drivers, we should have the possibility to mutate mappings on a per-query basis, which means that the driver client won't be mutated. We will be reaching out to the creator of the
postgres.js
library to inquire about the possibility of specifying per-query mapping interceptors and making this flow even better for all users.If we've overlooked this capability and it is already available with `postgres.js``, please ping us in our Discord!
A few more references for timestamps without and with timezones can be found in our docs
Bug fixed in this release
Big thanks to @Angelelz!
v0.29.5
Compare Source
New Features
🎉 WITH UPDATE, WITH DELETE, WITH INSERT - thanks @L-Mario564
You can now use
WITH
statements with INSERT, UPDATE and DELETE statementsUsage examples
Generated SQL:
For more examples for all statements, check docs:
🎉 Possibility to specify custom schema and custom name for migrations table - thanks @g3r4n
By default, all information about executed migrations will be stored in the database inside the
__drizzle_migrations
table,and for PostgreSQL, inside the
drizzle
schema. However, you can configure where to store those records.To add a custom table name for migrations stored inside your database, you should use the
migrationsTable
optionUsage example
To add a custom schema name for migrations stored inside your database, you should use the
migrationsSchema
optionUsage example
🎉 SQLite Proxy bacth and Relational Queries support
You can now use
.query.findFirst
and.query.findMany
syntax with sqlite proxy driverSQLite Proxy supports batch requests, the same as it's done for all other drivers. Check full docs
You will need to specify a specific callback for batch queries and handle requests to proxy server:
And then you can use
db.batch([])
method, that will proxy all queriesConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.