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

chore(deps): update dependency drizzle-kit to v0.23.0 #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 19, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
drizzle-kit 0.21.4 -> 0.23.0 age adoption passing confidence

Release Notes

drizzle-team/drizzle-kit-mirror (drizzle-kit)

v0.23.0

Compare Source

v0.22.8: 0.22.8

Compare Source

v0.22.7

Compare Source

v0.22.6: 0.22.6

Compare Source

  • πŸ› Fixed drizzle-kit up of snapshots from v6 to v7
  • πŸ› [BUG]: extensionsFilters: ['postgis'] still trying to delete spatial_ref_sys - #​2464

v0.22.5: 0.22.5

Compare Source

  • πŸ› [BUG]: Recreating pg index in version 0.31(orm) + 0.22(kit) fails - #​2470
  • πŸ› [BUG]: Drizzle migrator doesn't work with uppercase names when creating indexes - #​2457
  • πŸ› [BUG]: 'left' column name not escaped in index - #​2425
  • πŸ› [BUG]: drizzle-kit push TypeError Cannot use 'in' operator to search for 'default' in undefined - #​2385
  • πŸ› [BUG]: Breaking change in the new "PostgreSQL Indexes API" missing quotes for uppercase column letters - #​2413
  • πŸ› [BUG]: drizzle-kit migrate fail "applying migrations...error: column "authorid" does not exist" - #​2423

v0.22.4: 0.22.4

Compare Source

  • Removed data loss triggers on push when adding a NOT NULL constraint to a column and when removing the default value from a column. These actions will now be performed immediately, and if there are any NULL values in the column, you will receive an error from the database

v0.22.3: 0.22.3

Compare Source

  • πŸ› Fix Cannot use 'in' operator to search for 'default' in undefined error on push and generate

v0.22.2: 0.22.2

Compare Source

  • πŸ› Fixed index-on-expressions sql statement generation if the expression contains a ,. This should fix problems for tsvector indexes, such as:
titleSearchIndex: index('title_search_index').using('gin', sql`to_tsvector('english', ${table.title})`)

v0.22.1: 0.22.1

Compare Source

Bug fixes
  • πŸ› [BUG]: postgis geometry error: type "geometry(point)" does not exist
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.0

Compare 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

  • No way to define SQL expressions inside .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.
// Index declaration reference
index('name')
  .on(table.column1, table.column2, ...) or .onOnly(table.column1, table.column2, ...)
  .concurrently()
  .using(sql``) // sql expression
  .asc() or .desc()
  .nullsFirst() or .nullsLast()
  .where(sql``) // sql expression

Current API

// First example, with `.on()`
index('name')
  .on(table.column1.asc(), table.column2.nullsFirst(), ...) or .onOnly(table.column1.desc().nullsLast(), table.column2, ...)
  .concurrently()
  .where(sql``)
  .with({ fillfactor: '70' })

// Second Example, with `.using()`
index('name')
  .using('btree', table.column1.asc(), sql`lower(${table.column2})`, table.column1.op('text_ops'))
  .where(sql``) // sql expression
  .with({ fillfactor: '70' })

πŸŽ‰ Support for new types

Drizzle Kit can now handle:

  • point and line from PostgreSQL
  • vector from the PostgreSQL pg_vector extension
  • geometry from the PostgreSQL PostGIS 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 use push or introspect, all those tables will be included in diff operations. In this case, you would need to specify tablesFilter, 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 the public schema.

The postgis option will skip the geography_columns, geometry_columns, and spatial_ref_sys tables

import { defineConfig } from 'drizzle-kit'

export default defaultConfig({
  dialect: "postgresql",
  extensionsFilters: ["postgis"],
})

Improvements

πŸ‘ 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
import { defineConfig } from 'drizzle-kit'

export default defaultConfig({
  dialect: "postgresql",
  dbCredentials: {
    ssl: true, //"require" | "allow" | "prefer" | "verify-full" | options from node:tls
  }
})
import { defineConfig } from 'drizzle-kit'

export default defaultConfig({
  dialect: "mysql",
  dbCredentials: {
    ssl: "", // string | SslOptions (ssl options from mysql2 package)
  }
})
πŸ‘ Normilized SQLite urls for libsql and better-sqlite3 drivers

Those 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

export const users = sqliteTable(
  'users',
  {
    id: integer('id').primaryKey(),
    email: text('email').notNull(),
  },
  (table) => ({
    emailUniqueIndex: uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),
  }),
);
-- before
CREATE UNIQUE INDEX `emailUniqueIndex` ON `users` (`lower("users"."email")`);

-- now
CREATE UNIQUE INDEX `emailUniqueIndex` ON `users` (lower("email"));

Bug Fixes

  • [BUG]: multiple constraints not added (only the first one is generated) - #​2341
  • Drizzle Studio: Error: Connection terminated unexpectedly - #​435
  • Unable to run sqlite migrations local - #​432
  • error: unknown option '--config' - #​423

How push and generate works for indexes

Limitations
You should specify a name for your index manually if you have an index on at least one expression

Example

index().on(table.id, table.email) // will work well and name will be autogeneretaed
index('my_name').on(table.id, table.email) // will work well

// but

index().on(sql`lower(${table.email})`) // error
index('my_name').on(sql`lower(${table.email})`) // will work well
Push won't generate statements if these fields(list below) were changed in an existing index:
  • expressions inside .on() and .using()
  • .where() statements
  • operator classes .op() on columns

If you are using push workflows and want to change these fields in the index, you would need to:

  • Comment out the index
  • Push
  • Uncomment the index and change those fields
  • Push again

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.


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 these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

vercel bot commented Apr 19, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
ani βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jul 10, 2024 2:21pm

@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.20.15 chore(deps): update dependency drizzle-kit to v0.20.16 Apr 19, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from f41d3a3 to 936e95a Compare April 19, 2024 19:20
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.20.16 chore(deps): update dependency drizzle-kit to v0.20.17 Apr 20, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 936e95a to ddff513 Compare April 20, 2024 21:43
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from ddff513 to 7100e48 Compare May 6, 2024 16:27
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.20.17 chore(deps): update dependency drizzle-kit to v0.20.18 May 6, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 7100e48 to b0be87d Compare May 9, 2024 17:43
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.20.18 chore(deps): update dependency drizzle-kit to v0.21.0 May 9, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from b0be87d to 0b5ca1a Compare May 10, 2024 18:43
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.21.0 chore(deps): update dependency drizzle-kit to v0.21.1 May 10, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 0b5ca1a to 8ef11a2 Compare May 14, 2024 19:44
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.21.1 chore(deps): update dependency drizzle-kit to v0.21.2 May 14, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 8ef11a2 to a66e533 Compare May 22, 2024 15:32
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.21.2 chore(deps): update dependency drizzle-kit to v0.21.3 May 22, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from a66e533 to abe6c40 Compare May 22, 2024 19:47
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.21.3 chore(deps): update dependency drizzle-kit to v0.21.4 May 22, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from abe6c40 to c4d3f3a Compare May 23, 2024 23:50
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.21.4 chore(deps): update dependency drizzle-kit to v0.21.4 - autoclosed May 25, 2024
@renovate renovate bot closed this May 25, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from c4d3f3a to f3efd23 Compare May 31, 2024 10:23
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.0 chore(deps): update dependency drizzle-kit to v0.22.1 May 31, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from f3efd23 to cdf42a9 Compare May 31, 2024 14:32
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from cdf42a9 to 465f6f2 Compare June 4, 2024 15:49
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.1 chore(deps): update dependency drizzle-kit to v0.22.2 Jun 4, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 465f6f2 to 8e522dc Compare June 6, 2024 16:36
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.2 chore(deps): update dependency drizzle-kit to v0.22.3 Jun 6, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 8e522dc to 0e23a9c Compare June 6, 2024 19:38
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.3 chore(deps): update dependency drizzle-kit to v0.22.4 Jun 6, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 0e23a9c to 4c8baf8 Compare June 7, 2024 15:43
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.4 chore(deps): update dependency drizzle-kit to v0.22.5 Jun 7, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 4c8baf8 to 2ac58e4 Compare June 8, 2024 13:49
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.5 chore(deps): update dependency drizzle-kit to v0.22.6 Jun 8, 2024
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.6 chore(deps): update dependency drizzle-kit to v0.22.7 Jun 10, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 2ac58e4 to 1280377 Compare June 10, 2024 17:10
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 1280377 to 3d3d321 Compare June 29, 2024 13:53
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.7 chore(deps): update dependency drizzle-kit to v0.22.8 Jun 29, 2024
@renovate renovate bot force-pushed the renovate/drizzle-kit-0.x branch from 3d3d321 to 33da931 Compare July 10, 2024 14:19
@renovate renovate bot changed the title chore(deps): update dependency drizzle-kit to v0.22.8 chore(deps): update dependency drizzle-kit to v0.23.0 Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants