Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump drizzle-orm from 0.31.3 to 0.32.1 #454

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 3, 2024

Bumps drizzle-orm from 0.31.3 to 0.32.1.

Release notes

Sourced from drizzle-orm's releases.

0.32.1

  • Fix typings for indexes and allow creating indexes on 3+ columns mixing columns and expressions - thanks @​lbguilherme!
  • Added support for "limit 0" in all dialects - closes #2011 - thanks @​sillvva!
  • Make inArray and notInArray accept empty list, closes #1295 - thanks @​RemiPeruto!
  • fix typo in lt typedoc - thanks @​dalechyn!
  • fix wrong example in README.md - thanks @​7flash!

0.32.0

Release notes for drizzle-orm@0.32.0 and drizzle-kit@0.23.0

It's not mandatory to upgrade both packages, but if you want to use the new features in both queries and migrations, you will need to upgrade both packages

New Features

🎉 MySQL $returningId() function

MySQL itself doesn't have native support for RETURNING after using INSERT. There is only one way to do it for primary keys with autoincrement (or serial) types, where you can access insertId and affectedRows fields. We've prepared an automatic way for you to handle such cases with Drizzle and automatically receive all inserted IDs as separate objects

import { boolean, int, text, mysqlTable } from 'drizzle-orm/mysql-core';
const usersTable = mysqlTable('users', {
id: int('id').primaryKey(),
name: text('name').notNull(),
verified: boolean('verified').notNull().default(false),
});
const result = await db.insert(usersTable).values([{ name: 'John' }, { name: 'John1' }]).$returningId();
//    ^? { id: number }[]

Also with Drizzle, you can specify a primary key with $default function that will generate custom primary keys at runtime. We will also return those generated keys for you in the $returningId() call

import { varchar, text, mysqlTable } from 'drizzle-orm/mysql-core';
import { createId } from '@paralleldrive/cuid2';
const usersTableDefFn = mysqlTable('users_default_fn', {
customId: varchar('id', { length: 256 }).primaryKey().$defaultFn(createId),
name: text('name').notNull(),
});
const result = await db.insert(usersTableDefFn).values([{ name: 'John' }, { name: 'John1' }]).$returningId();
//  ^? { customId: string }[]

If there is no primary keys -> type will be {}[] for such queries

... (truncated)

Commits
  • 55231b0 Add 0.32.1 release notes
  • 341f17c Merge pull request #2574 from lbguilherme/patch-1
  • dcc13b8 Merge branch 'main' into patch-1
  • 026b9bb Merge pull request #2255 from sillvva/main
  • bd273a9 Merge branch 'main' into main
  • 32756ee Merge branch 'main' into patch-1
  • bdbadeb Merge pull request #2500 from 7flash/patch-1
  • adbe837 Merge branch 'main' into patch-1
  • 222d30c Merge pull request #2502 from RemiPeruto/feat/allow-empty-list-for-in-array-a...
  • bc71aad Merge branch 'main' into feat/allow-empty-list-for-in-array-and-not-in-array
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 3, 2024
Copy link

vercel bot commented Aug 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wycademy 🛑 Canceled (Inspect) Aug 3, 2024 0:50am

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/main/drizzle-orm-0.32.1 branch 3 times, most recently from 3e7982f to 8fb7169 Compare August 3, 2024 00:42
Bumps [drizzle-orm](https://github.com/drizzle-team/drizzle-orm) from 0.31.3 to 0.32.1.
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](drizzle-team/drizzle-orm@0.31.3...0.32.1)

---
updated-dependencies:
- dependency-name: drizzle-orm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/main/drizzle-orm-0.32.1 branch from 8fb7169 to 720378e Compare August 3, 2024 00:44
@DorielRivalet DorielRivalet merged commit 5bd618b into main Aug 3, 2024
4 of 5 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/main/drizzle-orm-0.32.1 branch August 3, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant