Skip to content

Releases: simolus3/drift

Drift 2.32.1

22 Mar 20:46

Choose a tag to compare

  • DevTools extension: Make error messages selectable.
  • For view columns referencing table columns as an alias, we now copy nullability and type converters from the source column (#3765).
  • Fix parsing references() with analyzer 10.2.0 and later.
  • Support analyzer versions >=10.0.0 <13.0.0.

Drift 2.32.0

28 Feb 20:43

Choose a tag to compare

  • Potentially breaking change Migrate to version 3.x of the sqlite3 package.
    To upgrade:
    • For the web, update sqlite3.wasm from a 3.x release.
    • If you've previously used sqlcipher_flutter_libs, see this for encryption support and note that SQLite3MultipleCiphers requires additional pragmas to be compatible with SQLCipher databases.
  • serializableConnection(), json1 and TableMigration are no longer marked as experimental.
  • Improve performance of mapping large result sets through joined select statements.
  • In drift files, imports and statements can now be parsed from SQL line comments. This makes drift files easier to use from some SQL editors:
-- import 'tables.drift';

-- deleteById:
DELETE FROM todos WHERE id = :id;

-- allTodos:
SELECT * FROM todos;

Drift 2.31.0

03 Feb 20:27
drift-2.31.0
853d037

Choose a tag to compare

  • In step-by-step migrations, automatically throw an error if a database downgrade is attempted. This has always been unsupported, but could lead to the database silently having a wrong user_version.
  • Fix JSON serialization for views referencing a nullable wrapper of a non-nullable column with a type converter attached to it.

sqlparser version 0.43.1

  • Support parsing DROP, VACUUM, REINDEX, ATTACH, DETACH, SAVEPOINT, RELEASE, ROLLBACK, ANALYZE, PRAGMA and ALTER TABLE statements.
  • Add SchemaBuffer class to apply ALTER TABLE and DROP statements to CREATE statements.

Drift 2.30.1

12 Jan 22:34
drift-2.30.1
884c77f

Choose a tag to compare

drift 2.30.1

  • Web: Fix databases being moved from IndexedDB to OPFS even if moveExistingIndexedDbToOpfs is disabled.

drift_dev 2.30.1

  • make_migrations: Don't generate schema test helpers when --no-test is set.
  • Generate managers entrypoint for @DriftAccessors as well.
  • Add ValidationOptions parameter to testWithDataIntegrity.

sqlparser 0.43.0

  • Allow parsing SQL from FileSpans, which is convenient for SQL embedded as text in outer structures.

Drift 2.30.0

05 Dec 21:57
drift-2.30.0
12c648b

Choose a tag to compare

Drift

  • Add rightOuterJoin and fullOuterJoin.
  • Wasm: Add the WasmProbeResult.moveFromIndexedDBToOpfs() method and the moveExistingIndexedDbToOpfs parameter on WasmDatabase.open. They can be used to move an existing database stored in IndexedDB to OPFS.

drift_flutter

  • Add isolateSetup parameter to DriftNativeOptions to setup isolates spawned to host database connections.

Generator

  • Schema export: Always export generated SQL statements as a reference.
  • Schema export: Always use temporary file instead of data URI.
  • Support analyzer versions 9.x.
  • Support dothand syntax when analyzing Dart sources.
  • Analysis: Support features added in SQLite version 3.51.0

Drift 2.29.0

18 Oct 13:34
drift-2.29.0
149909a

Choose a tag to compare

Query builder

  • Allow specifying ordering for columns in @TableIndex annotation.
  • Add DelegatedDatabase.externalExecutor, allowing transactions started externally to be used with drift.
  • Add Batch.insertFromSelect to insert rows from a select statement in a batch.

Generator

  • Fix invalid schema code for views.
  • Add the known_tables option. It allows defining external tables assumed to be available without including them in the drift-managed schema.
  • Fix unresolved references in CTEs resolving against the scope of the main query.
  • Static analysis support for the PowerSync SQLite extension.

Tools

  • Devtools extension: Support exporting databases.
  • Make-migrations: Add --no-test option to disable generating tests.
  • Internal: The drift website is now built with jaspr_content.

Drift 2.28.2

21 Sep 22:01
drift-2.28.2
b4e8c77

Choose a tag to compare

drift version 2.28.2:

  • Legacy wasm database: Fix cast issue when compiling with dart2wasm.
  • NativeDatabase.createBackground: Allow enabling isolateDebugLog.

drift_flutter version 0.2.7:

  • Add isolateDebugLog parameter to DriftNativeOptions to debug internal messages between isolates.

drift_dev version 2.28.3:

  • Remove dependencies on discontinued build packages.
  • Fix false-positive warnings about imported files not being referenced.

Drift 2.28.1

29 Jul 19:14
drift-2.28.1
7cb1a69

Choose a tag to compare

  • Add escapeChar argument to like() to generate an ESCAPE clause.
  • Native database: Cache prepared statements by default.
  • Support package:build version 3.

Drift 2.28.0

13 Jul 15:16
drift-2.28.0
8d7c8d3

Choose a tag to compare

drift

  • Query delegates: Support nested transactions in SupportedTransactionDelegate.
  • Add WasmProbeResult.exportDatabase to export an existing web database as a Uint8List.
  • Fix drift server isolates leaking when their only client isolate exits without closing the database.

drift_dev

  • Include preamble from drift build options in generated schema code.
  • Fix generated code not copying function expressions correctly.

sqlparser

  • Support new features introduced in SQLite version 3.50.0.

Drift 2.27.0

14 Jun 13:32
drift-2.27.0
b38b272

Choose a tag to compare

  • Allow passing sqlite3 callback to NativeDatabase to customize how SQLite bindings are obtained.
  • Fix generating versioned schema code for columns referencing other columns in generatedAs expressions.
  • Use proper impport statements when generating schema code.
  • Schema validation: Allow ignoring column constraints.
  • Devtools extension: Update displayed data automatically when it changes.