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): Bump the drift group in /packages/common/amplify_db_common_dart with 2 updates #4534

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 7, 2024

Bumps the drift group in /packages/common/amplify_db_common_dart with 2 updates: drift and drift_dev.

Updates drift from 2.14.1 to 2.16.0

Release notes

Sourced from drift's releases.

Drift 2.16.0 mostly contains performance and stability improvements:

  • When a migration throws, the database will now block subsequent operations instead of potentially allowing them to operate on a database in an inconsistent state.
  • Improve stack traces for errors happening on drift isolates (which includes usages of NativeDatabase.createInBackground).
  • Statements built through the Dart query builder will now run in the context active while they are running, instead of the context active at the time they were created. For instance, creating an UpdateStatement with database.update outside of a transaction and then calling UpdateStatement.write inside of a transaction will now perform the update inside of the transaction, instead of causing a deadlock.
  • Improve performance when reading results from joined statements with many rows.
  • Don't cache EXPLAIN statements, avoiding schema locks.
  • Deprecate Value.ofNullable in favor of Value.absentIfNull, which is more explicit about its behavior and allows nullable types too.
  • Migrate WasmDatabase to dart:js_interop and package:web.

Improvements to the generator

  • Allow selecting from virtual tables using the table-valued function syntax.
  • Keep import alias when referencing existing elements in generated code (#2845).

Improvements to drift_postgres

  • Drift's comparable expression operators are now available for expressions using postgres-specific date or timestamp types.

Drift 2.15.0

Drift 2.15 introduces new features improving web support and for sharing database classes against different databases (e.g. sqlite3 and Postgres):

  • Better support for custom SQL types:
    • Custom types are now applied consistently in the query builder API.
    • Add DialectAwareSqlType, a custom type depending on the runtime dialect. This allows writing "polyfill" types that use native date types on Postgres while falling back to a textual representation on sqlite3 for instance.
  • Initial JSONB support: sqlite 3.45 supports a binary JSON format aiming at reducing size and improving performance for JSON operations in SQL. Drift 2.15.0 supports jsonb functions in the query builder through package:drift/extensions/json1.dart. jsonb functions are also supported by sqlparser when analyzing drift files.
  • Runtime improvements:
    • Wasm databases hosted in workers are closed after the last client disconnects.
    • Add enableMigrations parameter to NativeDatabase to disable migrations, a flag useful for existing databases managed with an external schema tool.
  • Add analysis errors for illegal unqualified references to old and new in CREATE TRIGGER statements.

This release fixes a bug in the generator that is potentially breaking: Tables defined in .drift files with a NULL column constraint (e.g. CREATE TABLE users (display_name TEXT NULL, ...)) were not generated correctly - the NULL constraint was absent from the generated schema. This is not a soundness issue since NULL constraints are the default and ignored by sqlite3. However, it means that the actual schema of databases deviates from what drift will now expect, since NULL constraints will be expected from drift 2.15. This can cause issues with the schema validator after upgrading. If you are affected by this problem, the two possible ways to fix this are:

  1. To remove NULL constraints from column declarations in drift files. You don't need a migration for this since they don't affect semantics.
  2. To keep NULL constraints. In this case, you'll have to increment the schema version of your database and use Migrator.alterTable(affectedTable) on all affected tables to make it consistent with the schema with NULL constraints that drift is now expecting.

Also note that this only applies to drift files and not to NOT NULL constraints, which have always been generated correctly. Finally, older snapshots generated with drift_dev schema generate will continue to not report the NULL constraint, meaning that older migration tests won't break due to this change. If you have any questions or concerns about this, please reach out by opening an issue.

Commits
  • 417c2c1 Prepare release
  • f179fe3 Update dependencies in devtools extension
  • 54e205a Add integration tests for web migrations
  • d1d2b7f Add Value.absentIfNull
  • fe0df6d Add substrExpr to query builder
  • f9d5443 Migrate wasm internals to new interop
  • 27877a7 Clarify schema introspection update snippet
  • a26cc44 Add example for reflective update
  • 4fa75cb Fix new analysis warnings from Dart 3.3
  • d7a26a6 Test variable bindings through isolate dialect
  • Additional commits viewable in compare view

Updates drift_dev from 2.14.1 to 2.16.0

Commits
  • 417c2c1 Prepare release
  • f179fe3 Update dependencies in devtools extension
  • 54e205a Add integration tests for web migrations
  • d1d2b7f Add Value.absentIfNull
  • fe0df6d Add substrExpr to query builder
  • f9d5443 Migrate wasm internals to new interop
  • 27877a7 Clarify schema introspection update snippet
  • a26cc44 Add example for reflective update
  • 4fa75cb Fix new analysis warnings from Dart 3.3
  • d7a26a6 Test variable bindings through isolate dialect
  • Additional commits viewable in compare view

You can trigger a rebase of this PR 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

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot requested a review from a team as a code owner March 7, 2024 12:17
@dependabot dependabot bot added dart Pull requests that update Dart code dependencies Pull requests that update a dependency file labels Mar 7, 2024
@dependabot dependabot bot force-pushed the dependabot/pub/packages/common/amplify_db_common_dart/drift-af0992228d branch 4 times, most recently from 5e9380b to 167ace8 Compare March 18, 2024 12:53
@dependabot dependabot bot force-pushed the dependabot/pub/packages/common/amplify_db_common_dart/drift-af0992228d branch 3 times, most recently from 9a005f0 to 09e002c Compare March 22, 2024 12:43
@dependabot dependabot bot force-pushed the dependabot/pub/packages/common/amplify_db_common_dart/drift-af0992228d branch 4 times, most recently from f88fbf8 to d3d32dd Compare April 2, 2024 20:58
@dependabot dependabot bot force-pushed the dependabot/pub/packages/common/amplify_db_common_dart/drift-af0992228d branch 3 times, most recently from c789b60 to 1047515 Compare April 4, 2024 12:48
@dependabot dependabot bot force-pushed the dependabot/pub/packages/common/amplify_db_common_dart/drift-af0992228d branch 2 times, most recently from 5abcb7c to 3b9de33 Compare April 16, 2024 12:20
Bumps the drift group in /packages/common/amplify_db_common_dart with 2 updates: [drift](https://github.com/simolus3/drift) and [drift_dev](https://github.com/simolus3/drift).


Updates `drift` from 2.14.1 to 2.16.0
- [Release notes](https://github.com/simolus3/drift/releases)
- [Commits](simolus3/drift@drift-2.14.1...drift-2.16.0)

Updates `drift_dev` from 2.14.1 to 2.16.0
- [Release notes](https://github.com/simolus3/drift/releases)
- [Commits](simolus3/drift@drift_dev-2.14.1...drift_dev-2.16.0)

---
updated-dependencies:
- dependency-name: drift
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: drift
- dependency-name: drift_dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: drift
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pub/packages/common/amplify_db_common_dart/drift-af0992228d branch from 3b9de33 to 38141bd Compare April 17, 2024 12:50
Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 18, 2024

Looks like these dependencies are updatable in another way, so this is no longer needed.

@dependabot dependabot bot closed this Apr 18, 2024
@dependabot dependabot bot deleted the dependabot/pub/packages/common/amplify_db_common_dart/drift-af0992228d branch April 18, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dart Pull requests that update Dart code dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants