Versions 2.21.0 of drift
and drift_dev
as well as version 0.2.1 of drift_flutter
have just been released:
Core changes
View.from
is now declared to return aJoinedSelectStatement
, the type it returns at runtime.- The manager APIs now support computed fields, allowing advanced SQL expressions to be embedded into simple manager queries.
Isolate improvements
- To infer whether serialization is required for inter-isolate communication, drift now sends a test message instead of serializing by default.
drift_flutter
: Enable serialization between background isolates where necessary.
Tooling and generator
- The DevTools extension can now clear drift databases.
- Fix Dart-defined
check
constraints not being considered in exported schemas. - Columns can now be defined with
late final
fields. Defining columns with getters=>
is still supported too.class MyTable extends Table { // Before: IntColumn get id => integer().autoIncrement()(); // After: late final id = integer().nullable()(); }
- Make
build.yaml
definitions passbuild_runner doctor
. - Fix
generate_manager
option not consistently being applied to modular builds. - Add the
make-migrations
command which combines the existing schema commands into a single tool.