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-dev): bump the drizzle group across 1 directory with 2 updates #1456

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 13, 2024

Bumps the drizzle group with 2 updates in the / directory: drizzle-kit and drizzle-orm.

Updates drizzle-kit from 0.29.1 to 0.30.1

Release notes

Sourced from drizzle-kit's releases.

[email protected]

New Features

drizzle-kit export

To make drizzle-kit integration with other migration tools, like Atlas much easier, we've prepared a new command called export. It will translate your drizzle schema in SQL representation(DDL) statements and outputs to the console

// schema.ts
import { pgTable, serial, text } from 'drizzle-orm/pg-core'
export const users = pgTable('users', {
id: serial('id').primaryKey(),
email: text('email').notNull(),
name: text('name')
});

Running

npx drizzle-kit export

will output this string to console

CREATE TABLE "users" (
        "id" serial PRIMARY KEY NOT NULL,
        "email" text NOT NULL,
        "name" text
);

By default, the only option for now is --sql, so the output format will be SQL DDL statements. In the future, we will support additional output formats to accommodate more migration tools

npx drizzle-kit export --sql

[email protected]

Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer include IF NOT EXISTS, $DO, or similar statements, which could cause incorrect DDL statements to not fail when an object already exists in the database and should actually fail.

This change marks our first step toward several major upgrades we are preparing:

  • An updated and improved migration workflow featuring commutative migrations, a revised folder structure, and enhanced collaboration capabilities for migrations.
  • Better support for Xata migrations.
  • Compatibility with CockroachDB (achieving full compatibility will only require removing serial fields from the migration folder).
Commits
  • 10d2230 Merge pull request #3760 from drizzle-team/beta
  • fe986e6 Merge branch 'main' of github.com:drizzle-team/drizzle-orm into beta
  • 3572f21 Add release notes
  • 7cd9d79 Merge pull request #3693 from drizzle-team/feature/mysql-force-index
  • d9d234e Merge branch 'beta' into feature/mysql-force-index
  • 21dab20 Merge pull request #3705 from drizzle-team/drizzle-kit/export-sql
  • 5ba9147 Merge branch 'beta' into drizzle-kit/export-sql
  • 866c257 Merge pull request #3750 from drizzle-team/beta
  • d379dcf dprint
  • 54d5e5e Release Notes
  • Additional commits viewable in compare view

Updates drizzle-orm from 0.37.0 to 0.38.2

Release notes

Sourced from drizzle-orm's releases.

0.38.2

New features

USE INDEX, FORCE INDEX and IGNORE INDEX for MySQL

In MySQL, the statements USE INDEX, FORCE INDEX, and IGNORE INDEX are hints used in SQL queries to influence how the query optimizer selects indexes. These hints provide fine-grained control over index usage, helping optimize performance when the default behavior of the optimizer is not ideal.

Use Index

The USE INDEX hint suggests to the optimizer which indexes to consider when processing the query. The optimizer is not forced to use these indexes but will prioritize them if they are suitable.

export const users = mysqlTable('users', {
  id: int('id').primaryKey(),
  name: varchar('name', { length: 100 }).notNull(),
}, () => [usersTableNameIndex]);
const usersTableNameIndex = index('users_name_index').on(users.name);
await db.select()
.from(users, { useIndex: usersTableNameIndex })
.where(eq(users.name, 'David'));

Ignore Index

The IGNORE INDEX hint tells the optimizer to avoid using specific indexes for the query. MySQL will consider all other indexes (if any) or perform a full table scan if necessary.

export const users = mysqlTable('users', {
  id: int('id').primaryKey(),
  name: varchar('name', { length: 100 }).notNull(),
}, () => [usersTableNameIndex]);
const usersTableNameIndex = index('users_name_index').on(users.name);
await db.select()
.from(users, { ignoreIndex: usersTableNameIndex })
.where(eq(users.name, 'David'));

Force Index

The FORCE INDEX hint forces the optimizer to use the specified index(es) for the query. If the specified index cannot be used, MySQL will not fall back to other indexes; it might resort to a full table scan instead.

export const users = mysqlTable('users', {
  id: int('id').primaryKey(),
  name: varchar('name', { length: 100 }).notNull(),
}, () => [usersTableNameIndex]);
</tr></table> 

... (truncated)

Commits
  • 10d2230 Merge pull request #3760 from drizzle-team/beta
  • fe986e6 Merge branch 'main' of github.com:drizzle-team/drizzle-orm into beta
  • 3572f21 Add release notes
  • 7cd9d79 Merge pull request #3693 from drizzle-team/feature/mysql-force-index
  • d9d234e Merge branch 'beta' into feature/mysql-force-index
  • 21dab20 Merge pull request #3705 from drizzle-team/drizzle-kit/export-sql
  • 5ba9147 Merge branch 'beta' into drizzle-kit/export-sql
  • 866c257 Merge pull request #3750 from drizzle-team/beta
  • d379dcf dprint
  • 54d5e5e Release Notes
  • Additional commits viewable in compare view

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 <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

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

cloudflare-workers-and-pages bot commented Dec 13, 2024

Deploying mach with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ad0fc9
Status: ✅  Deploy successful!
Preview URL: https://466ef750.mach.pages.dev
Branch Preview URL: https://dependabot-npm-and-yarn-main-mtnx.mach.pages.dev

View logs

Copy link

codesandbox bot commented Dec 13, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@jpedroh jpedroh enabled auto-merge (squash) December 16, 2024 01:43
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/main/drizzle-0a986a76cf branch 3 times, most recently from 06f86ed to 7514db0 Compare December 16, 2024 01:51
…ates

Bumps the drizzle group with 2 updates in the / directory: [drizzle-kit](https://github.com/drizzle-team/drizzle-orm) and [drizzle-orm](https://github.com/drizzle-team/drizzle-orm).


Updates `drizzle-kit` from 0.29.1 to 0.30.1
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/compare/[email protected]@0.30.1)

Updates `drizzle-orm` from 0.37.0 to 0.38.2
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](drizzle-team/drizzle-orm@0.37.0...0.38.2)

---
updated-dependencies:
- dependency-name: drizzle-kit
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: drizzle
- dependency-name: drizzle-orm
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: drizzle
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/main/drizzle-0a986a76cf branch from 7514db0 to 3ad0fc9 Compare December 16, 2024 01:53
@jpedroh jpedroh merged commit d126c9a into main Dec 16, 2024
5 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/main/drizzle-0a986a76cf branch December 16, 2024 01:55
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