boyan01 / flutter-netease-music

flutter music player application. (仿网易云音乐)
3.5k stars 853 forks source link

Bump drift from 2.13.1 to 2.15.0 #332

Closed dependabot[bot] closed 7 months ago

dependabot[bot] commented 7 months ago

Bumps drift from 2.13.1 to 2.15.0.

Release notes

Sourced from drift's releases.

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.

Drift 2.14.1

This minor release fixes bugs in the drift and the drift_dev packages:

  • Fix WasmProbeResult.open ignoring the ìnitializeDatabase callback.
  • Fix inconsistencies when generating Variable instances for columns with custom types.
  • Fix a build performance regression introduced in version 2.14.0 related to analyzing imports in drift files.

Drift 2.14

New features in drift:

  • Add the QueryInterceptor API to easily monitor or transform all database calls made by drift.
  • Add the count() extension on tables to easily count rows in tables or views.
  • For updates made in drift files, we now support the column-name-list syntax.

Changes to the generator:

  • Breaking change: The name of the generated row class derived from the name of the Dart table name now supports more forms of plurals. For instance, a table without a @DataClassName annotation named Categories would now generate a Category class instead of Categorie. This is done in a minor release because we assume users previously running into this are already using @DataClassName as a workaround.
  • Make versioned schema snapshots generated by drift_dev schema steps public.
  • Don't generate const row classes when they are extending a class which isn't const.
  • Fix indices attached to tables not generating reliably.
Commits
  • 38d603c Prepare release
  • b6fbfdb sqlparser support for jsonb
  • 8adb3bd Fix sqlite3 download link on windows
  • 2a2990e Support jsonb functions in query builder
  • c4169f6 Add timestamp with timezone type
  • f84407a Document content-type header for wasm files
  • a683408 Add option to disable migrations
  • b214f2c docs: add one-liner dependency addition instructions in the documentation (#2...
  • f25eaf1 Support dialect-specific types
  • 09c6cf0 Close vfs when wasm database is closed
  • 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 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[bot] commented 7 months ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.