chore(deps): update dependency drizzle-kit to ^0.26.0 #140
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.25.0
->^0.26.0
Release Notes
drizzle-team/drizzle-orm (drizzle-kit)
v0.26.2
Compare Source
v0.26.1
Compare Source
v0.26.0
Compare Source
Drizzle ORM 0.26.0 is here 🎉
README docs are fully transferred to web
The documentation has been completely reworked and updated with additional examples and explanations. You can find it here: https://orm.drizzle.team.
Furthermore, the entire documentation has been made open source, allowing you to edit and add any information you deem important for the community.
Visit https://github.com/drizzle-team/drizzle-orm-docs to access the open-sourced documentation.
Additionally, you can create specific documentation issues in this repository
New Features
Introducing our first helper built on top of Drizzle Core API syntax: the Relational Queries! 🎉
With Drizzle RQ you can do:
where
statements, allowing you to define custom conditions beyond the predefined ones available in the Drizzle Core API.Most importantly, regardless of the size of your query, Drizzle will always generate a SINGLE optimized query.
This efficiency extends to the usage of Prepared Statements, which are fully supported within the Relational Query Builder.
For more info: Prepared Statements in Relational Query Builder
Example of setting one-to-many relations
Example of querying you database
Step 1: Provide all tables and relations to
drizzle
functionIf you have schema in multiple files
Step 2: Query your database with Relational Query Builder
Select all users
Select first users
Select all users
Get all posts with just
id
,content
and includecomments
Select all posts excluding
content
columnFor more examples you can check full docs for Relational Queries
Bug fixes
Drizzle Kit updates
New ways to define drizzle config file
You can now specify the configuration not only in the
.json
format but also in.ts
and.js
formats.TypeScript example
JavaScript example
New commands 🎉
drizzle-kit push:mysql
You can now push your MySQL schema directly to the database without the need to create and manage migration files. This feature proves to be particularly useful for rapid local development and when working with PlanetScale databases.
By pushing the MySQL schema directly to the database, you can streamline the development process and avoid the overhead of managing migration files. This allows for more efficient iteration and quick deployment of schema changes during local development.
How to setup your codebase for drizzle-kit push feature?
For this feature, you need to create a
drizzle.config.[ts|js|json]
file. We recommend using.ts
or.js
files as they allow you to easily provide the database connection information as secret variablesYou'll need to specify
schema
andconnectionString
(ordb
,port
,host
,password
, etc.) to makedrizzle-kit push:mysql
workdrizzle.config.ts
exampleRun
drizzle-kit push:mysql
If Drizzle detects any potential
data-loss
issues during a migration, it will prompt you to approve whether the data should be truncated or not in order to ensure a successful migrationApprove or reject the action that Drizzle needs to perform in order to push your schema changes to the database.
Done ✅
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 was generated by Mend Renovate. View the repository job log.