drift_dev 2.8.0 copy "drift_dev: ^2.8.0" to clipboard
drift_dev: ^2.8.0 copied to clipboard

Dev-dependency for users of drift. Contains the generator and development tools.

2.8.0 #

  • Support named constructors for existing row types in drift files (#2399).
  • Fix compilation issues with analyzer: 5.12.0.

2.7.0 #

  • Make validateDatabaseSchema() work in migration tests.
  • Fix elements from transitive imports in drift files not being added reliably.

2.6.0 #

  • Fix invalid schema verification code being generated for columns with a clientDefault.
  • Support drift 2.6.0

2.5.2 #

  • Fix generated code for blob columns when modular generation is enabled.

2.5.1 #

  • Fix an error resolving multiple table references across different files.
  • Fix crash when giving a query with two identical columns a custom result class name.

2.5.0+1 #

  • Support MAPPED BY for individual columns in queries or in views defined with SQL.
  • Consistently interpret CAST (x AS DATETIME) and CAST(x AS TEXT) in drift files.
  • Support a CAST to an enum type in drift types.
  • The generate_connect_constructor option is now deprecated, as a DatabaseConnection can be passed whereever a QueryExecutor is used too.
  • Support two different queries using LIST() columns having the same result class name.
  • Fix table classes not extending defining Dart classes with modular generation.
  • Fix @UseDataClass with extending not working with modular generation.
  • Fix generating invalid code when using a type converter with a nullable JSON type.
  • Avoid unecessary async modifier when mapping queries to existing row classes.

2.4.1 #

  • Improvements and fixes for schema files:
    • Fix views with an existing row type generating invalid SQL in schema files.
    • Fix schema generate --companions implicitly requiring --data-classes as well.
    • Fix toColumns() not being generated correclty.
    • Fix conflicting names being generated by schema generate when using existing row types on views.

2.4.0 #

  • Add support for textEnum columns in Dart (or ENUMNAME in .drift) to store enum columns as text (via Enum.name).
  • Adds the case_from_dart_to_sql option with the possible values: preserve, camelCase, CONSTANT_CASE, snake_case, PascalCase, lowercase and UPPERCASE (default: snake_case).
  • drift_dev schema dump can now dump the schema of existing sqlite3 database files as well.
  • Warn about suspicious int or text literals being inserted into enum columns.
  • Support existing row types on queries defined in drift files.
  • For Dart-defined columns, customConstraints are now parsed and respected by the generator.
  • It is now allowed to interleave queries and tables in a drift file.
  • Experimental support for Dart records as existing row or query types. Please note that records aren't stable yet in Dart or Drift, so this feature might be changed or removed depending on its development in the Dart language.

2.3.3 #

  • Fix a crash in schema generate.

2.3.2 #

  • Fix a builder crash when importing triggers or indices.

2.3.1 #

  • Fix invalid code being generated through drift_dev schema generate.

2.3.0 #

  • Support drift 2.3.x
  • Re-implement drift's internal analyzer to make the build process more efficient.
  • Add an optional, modular build mode in which drift generates code for each file declaring tables instead of emitting a large file just for the entrypoint.

2.2.0+1 #

  • Potentially breaking bug-fix: Fix the nullability of columns generated for Dart-defined views.
  • Serialize uniqueKeys overrides into a database schema.
  • Support latest version of the analyzer package.

2.1.0 #

  • Analysis support fts5 tables with external content tables.
  • Analysis support for the rtree module.
  • Prepare for an upcoming breaking analyzer change around how classes are mapped to elements.

2.0.2 #

  • Generate public typedefs for the signatures of scoped_dart_components, making it easier to re-use them for own methods.

2.0.1 #

  • Recognize options for an applied not_shared builder when exporting schemas.

2.0.0 #

  • Removes the following build options, which are always turned on now:
  • null_aware_type_converters
  • new_sql_code_generation
  • compact_query_methods
  • Starting from this version, drift only supports generating non-nullable Dart code. You'll have to at least opt your database code into null-safety to use this and upcoming drift releases.

These changes help reduce complexity in the generator.

1.7.1 #

  • Support the latest versions of the analyzer and analyzer_plugin packages.

1.7.0 #

  • Support for new drift 1.7 features like int64 columns.
  • Analysis support for upcoming sqlite 3.39 features in .drift files.

1.6.0 #

  • Write Dart references into schema files.
  • Support new drift features from version 1.6.0, like check and unique column constraints in Dart tables.

1.5.2 #

  • Fix crash when reading dynamic type converters.

1.5.1 #

  • Support migrations from moor_flutter to drift_sqflite in the migrate command.

1.5.0 #

  • Add validateDatabaseSchema extension to api/migrations.dart. It validates that the schema of a database at runtime matches what one would expect.
  • Allow cascade operators in the query for Dart-defined views.

1.4.0 #

  • Generator support for the LIST() feature introduced in drift 1.4.
  • Fix imported views in .drift files not being available in all cases.

1.3.0 #

  • Support drift version 1.3.x.

1.2.1 #

  • Support the latest analyzer and analyzer_plugin packages.

1.2.0 #

  • Generate code needed to support streams of views.

1.1.1 #

  • Improve error handling around custom row classes.

1.1.0 #

  • Consider drift-named files when generating schema migrations (#1486)
  • Emit correct SQL code when using arrays with the new_sql_code_generation option in specific scenarios.
  • Transform .moor.dart part files in the migrate command.

1.0.2 #

  • Also transform analysis_options.yaml files in the drift_dev migrate command.

1.0.1 #

This is the initial release of the drift_dev package (formally known as moor_generator). For an overview of old moor releases, see its changelog.