NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #377 most downloaded on pub.dev
Dev-dependency for users of drift. Contains the generator and development tools.
Last release 7 days ago
30 Sep 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
4 versions withdrawn
withdrawn after publishing
5 years old
96 releases · first in 2021
One column per quarter.
Support latest version of package:cli_util .
package:cli_util.Warn when a table class is annotated with @DriftDatabase instead of silently generating nothing.
@DriftDatabase instead of silentlyFix dependency version in drift3 preview
Fix dependency version in drift3 preview
moor from drift.drift_dev command not completing when spawning a schema isolate fails.Escape SQL column names that are reserved Dart keywords (e.g. class ) when deriving the Dart getter name.
class) whenFix version number typo in changelog
Fix version number typo in changelog
TRUE/FALSE as equal to 1/0, respectively.Fix version number typo in changelog
Fix version number typo in changelog
Unknown pending element errors.Nothing published for this version
We rely on SourceFile.codeUnits , added in 1.10.0.
We rely on SourceFile.codeUnits, added in 1.10.0.
update statements to reference companions.Fix reads queued in a MultiExecutor connection pool being resumed in the wrong zone once an executor became available. Because Drift's cancellation to
MultiExecutor connection pool being resumed in the wrong zone once an executor became available. Because Drift's cancellation tokens are zone-scoped, this could cause queries to be cancelled or observed in the wrong zone (#3824).update statements to reference companions.RIGHT or FULL join as nullable (#3812).CaseInsensitiveMap.containsKey to be case-insensitive.Support latest cli_util versions.
cli_util versions.Add setup callback to validateDatabaseSchema in VerifySelf extension.
setup callback to validateDatabaseSchema in VerifySelf extension.$ in their name.use_sql_table_name_for_accessors build option, naming the table
getters on the database class after the table's SQL name instead of the Dart
class name.Drift files: Support features from SQLite version 3.53.
For view columns referencing table columns as an alias, we now copy nullability and type converters from the source column (#3765).
references() with analyzer 10.2.0 and later.>=10.0.0 <13.0.0.Support version 3.x of the sqlite3 package.
sqlite3 package.Fix JSON serialization for views referencing a nullable wrapper of a non-nullable column with a type converter attached to it.
make_migrations: Don't generate schema test helpers when --no-test is set.
make_migrations: Don't generate schema test helpers when --no-test is set.@DriftAccessors as well.ValidationOptions parameter to testWithDataIntegrity.Schema export: Always export generated SQL statements as a reference.
Fix invalid schema code for views.
known_tables option. It allows defining external tables assumed to be available
without including them in the drift-managed schema.--no-test option to disable generating tests.Remove dependencies on discontinued build packages.
Fix generating code for typedefs with different parameters than the type they point to.
typedefs with different parameters than the type they point to.analyzer version 8.xSupport package:build version 3.
package:build version 3.Nothing published for this version
Include preamble from drift build options in generated schema code.
Fix generating versioned schema code for columns referencing other columns in generatedAs expressions.
generatedAs expressions.Fix generatedAs not being generated for versioned schema imports.
generatedAs not being generated for versioned schema imports.SchemaVerifier
implementation.drift_dev schema dump is used on SQLite databases with
triggers, views or indexes.0 when no command was selected.Fix warning on Dart-defined views referencing the same table multiple times.
make-migrations.Fix generateInsertable: true on @UseRowClass not respecting inherited getters.
generateInsertable: true on @UseRowClass not respecting inherited
getters.make-migrations.Fix schema exports ignoring store_date_time_values_as_text: true when Dart tables with default constraints on columns are involved.
store_date_time_values_as_text: true when Dart
tables with default constraints on columns are involved.Fix incorrect code when applying non-nullable type converters with a nullable JSON type to nullable column.
toString().flutter_test if the core test package is
unavailable and warn when database class needs changes for test.Support versions 7.x of the analyzer package.
7.x of the analyzer package.Generate typed reference-resolving queries through the manager API when modular code-generation is enabled. Previously, this feature was only enabled
Fix custom companion names on @DataClassName not being recognized.
@DataClassName not being recognized.dart_style version.sqlite3) is enabled.Fix generating Dart expressions without an inferred type.
Deprecate package:drift_dev/api/migrations.dart in favor of package:drift_dev/api/migrations_native.dart.
package:drift_dev/api/migrations.dart in favor of package:drift_dev/api/migrations_native.dart.row_class_constructor_all_required builder option.dbstat table in drift-file queries when enabling the dbstat module.make-migrations using invalid import URIs in generated test on Windows.Fix test template generated by make-migrations to not assume the name of the database class.
make-migrations to not assume the name of
the database class.Fix generated code missing question marks for nullable types in some instances.
Fix Dart-defined check constraints not being considered in exported schemas.
check constraints not being considered in exported
schemas.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()();
}
build.yaml definitions pass build_runner doctor.generate_manager option not consistently being applied to modular builds.make-migrations command which combines the existing schema commands
into a single tool.Fix internal serialization-related errors for triggers targeting views.
Strip leading numbers when generating modular accessor names for drift files, fixing syntax errors.
schema export not respecting column constraints of the target dialect.Fix a code generation bug causing managers to reference the wrong column when building joins.
Add drift dev schema export command, which exports the DDL statements making up a database schema based on its definition in source.
drift dev schema export command, which exports the DDL statements making
up a database schema based on its definition in source.Fix drift_dev schema dump not working with older versions of the analyzer package that are still supported by drift_dev.
drift_dev schema dump not working with older versions of the analyzer
package that are still supported by drift_dev.Fix generated CREATE VIEW statements containing existing row class syntax only supposed to be used during static analysis.
CREATE VIEW statements containing existing row class syntax
only supposed to be used during static analysis.drift_dev schema steps generating invalid code when no migrations have
been defined yet.Add support for the geopoly extension in drift files.
geopoly extension in drift files.Fix drift using the wrong import alias in generated part files.
use_sql_column_name_as_json_key builder option.setup parameter to SchemaVerifier. It is called when the verifier
creates database connections (similar to the callback on NativeDatabase)
and can be used to register custom functions.Keep import alias when referencing existing elements in generated code (#2845).
Potentially __breaking change__: Fix a bug causing NULL column constraints not to show up in generated table definitions. This is a breaking change dr…
NULL column constraints
not to show up in generated table definitions.
This is a breaking change drift's migration tooling is used, since they will
not expect the NULL column constraint to be there.
After upgrading, you can either drop the NULL constraint from your drift
files to make it consistent with the schema (since NULL column constraints
are the default ignored by sqlite3), or increment the schema version and run
a TableMigration on affected tables to make column constraints consistent.Fix inconsistencies when generating Variable instances for columns with custom types.
Variable instances for columns with
custom types.__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…
@DataClassName annotation named Categories
would now generate a Category class instead of Categorie. This is done in
a minor release because we assume most users are using @DataClassName in those
cases.drift_dev schema steps public.const row classes when they are extending a class which
isn't const.Fix generated queries relying on custom types.
Add has_separate_analyzer option to optimize builds using the not_shared builder.
has_separate_analyzer option to optimize builds using the not_shared builder.Fix indices not being created for Dart tables from different files.
int64 columns not propagating properly.Fix invalid types listed in views crashing the generator.
views crashing the generator.Adds the static getter $name to generated table classes.
$name to generated table classes.@TableIndex annotation.Follow export directives when looking for table imports.
export directives when looking for table imports.Reduce the amount of assets read by drift, improving build performance and enabling faster incremental rebuilds.
@UseRowClass with generateInsertable: true when
modular code generation is enabled.Nested result columns in drift files can now refer to any result set (e.g. a table-valued function or a subquery). They were restricted to direct tabl
dialects builder option to generate code supporting multiple SQL dialects.preamble option for non-shared or modular build setups to mirror the preamble
option from source_gen:combining_builder.Add the schema steps command to generate help in writing step-by-step schema migrations.
schema steps command to generate help in writing step-by-step schema migrations.include. They should be
added to a database via tables or views explicitly.Add fatal_warnings builder option to fail the build when drift reports warnings.
fatal_warnings builder option to fail the build when drift reports warnings.Allow Dart-defined tables to reference imported tables through SQL #2433.
Your coding agent can read these notes before it upgrades. Set up the MCP server →