Skip to content

Drift 2.21.0

Latest
Compare
Choose a tag to compare
@simolus3 simolus3 released this 14 Oct 21:54
· 33 commits to develop since this release
drift-2.21.0
3c11432

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 a JoinedSelectStatement, 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 pass build_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.