2024-02-29 09:08:51 -08:00
## 2.17.0-dev
- Fix drift using the wrong import alias in generated part files.
2024-03-06 11:56:03 -08:00
- Add the `use_sql_column_name_as_json_key` builder option.
2024-04-05 13:39:05 -07:00
- Add a `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.
2024-02-29 09:08:51 -08:00
2024-02-24 14:17:54 -08:00
## 2.16.0
2024-01-18 12:26:39 -08:00
- Keep import alias when referencing existing elements in generated code
([#2845](https://github.com/simolus3/drift/issues/2845)).
2024-01-17 14:02:49 -08:00
## 2.15.0
2023-12-12 12:46:58 -08:00
- Potentially __breaking change__ : Fix a bug causing `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
2024-01-17 14:02:49 -08:00
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.
2023-12-12 12:46:58 -08:00
2023-12-10 05:23:19 -08:00
## 2.14.1
- Fix inconsistencies when generating `Variable` instances for columns with
custom types.
2023-12-11 14:55:37 -08:00
- Fix a build performance regression introduced in version 2.14.0 related to
analyzing imports in drift files.
2023-12-10 05:23:19 -08:00
2023-12-04 02:07:21 -08:00
## 2.14.0
2023-11-09 10:03:32 -08:00
2023-11-22 04:09:09 -08:00
- __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, a table without a `@DataClassName` annotation named `Categories`
2023-12-04 02:07:21 -08:00
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.
2023-11-27 13:48:37 -08:00
- Make versioned schema snapshots generated by `drift_dev schema steps` public.
2023-11-19 05:33:55 -08:00
- Don't generate `const` row classes when they are extending a class which
isn't const.
2023-12-04 02:07:21 -08:00
- Fix indices attached to tables not generating reliably.
2023-11-19 05:33:55 -08:00
2023-11-11 12:23:53 -08:00
## 2.13.2
2023-11-09 10:03:32 -08:00
- Fix generated queries relying on custom types.
2023-10-29 11:32:23 -07:00
## 2.13.1
2023-10-23 09:35:29 -07:00
- Add `has_separate_analyzer` option to optimize builds using the `not_shared` builder.
2023-10-25 13:08:55 -07:00
- Avoid illegal references to implicitly nullable variant of type converter when no such
field exists.
2023-10-23 09:35:29 -07:00
2023-10-20 02:05:09 -07:00
## 2.13.0
2023-09-27 13:06:49 -07:00
2023-10-03 11:54:28 -07:00
- Fix indices not being created for Dart tables from different files.
- Fix type converters on `int64` columns not propagating properly.
2023-09-27 13:06:49 -07:00
2023-09-27 05:48:03 -07:00
## 2.12.1
2023-09-25 06:29:09 -07:00
- Fix invalid types listed in `views` crashing the generator.
2023-09-27 05:46:50 -07:00
- Fix indices in drift files crashing the generator when they index expressions.
2023-09-25 06:29:09 -07:00
2023-09-24 07:17:07 -07:00
## 2.12.0
2023-09-20 06:59:31 -07:00
2023-09-20 20:36:53 -07:00
- Adds the static getter `$name` to generated table classes.
2023-09-24 07:17:07 -07:00
- Recognize and analyze the `@TableIndex` annotation.
2023-09-20 06:59:31 -07:00
2023-09-07 08:22:01 -07:00
## 2.11.2
2023-09-03 13:34:40 -07:00
- Follow `export` directives when looking for table imports.
2023-08-27 08:11:04 -07:00
## 2.11.1
2023-08-12 13:03:58 -07:00
- Reduce the amount of assets read by drift, improving build performance and enabling faster
incremental rebuilds.
2023-08-13 09:59:31 -07:00
- Fix missing import references around `@UseRowClass` with `generateInsertable: true` when
modular code generation is enabled.
2023-08-16 15:15:36 -07:00
- Support references to builtin sqlite3 tables in drift files.
2023-08-12 13:03:58 -07:00
2023-07-24 12:10:04 -07:00
## 2.11.0
- [Nested result columns ](https://drift.simonbinder.eu/docs/using-sql/drift_files/#nested-results )
in drift files can now refer to any result set (e.g. a table-valued function or a subquery).
They were restricted to direct table references before.
2023-07-27 01:22:37 -07:00
- Add the `dialects` builder option to generate code supporting multiple SQL dialects.
2023-07-30 14:14:32 -07:00
- Add the `preamble` option for non-shared or modular build setups to mirror the `preamble`
option from `source_gen:combining_builder` .
2023-07-24 12:10:04 -07:00
2023-07-13 07:53:51 -07:00
## 2.10.0
- Add the `schema steps` command to generate help in writing step-by-step schema migrations.
- Report a warning when Dart tables are implicitly added due to `include` . They should be
added to a database via `tables` or `views` explicitly.
2023-06-13 13:13:23 -07:00
## 2.9.0
- Add `fatal_warnings` builder option to fail the build when drift reports warnings.
2023-06-01 02:26:57 -07:00
## 2.8.3
2023-05-23 06:58:15 -07:00
- Allow Dart-defined tables to reference imported tables through SQL
[#2433 ](https://github.com/simolus3/drift/issues/2433 ).
2023-05-16 02:09:29 -07:00
## 2.8.2
- Fix generated to write qualified column references for Dart components in
drift files if the same table is available under different names.
2023-05-14 12:54:51 -07:00
## 2.8.1
2023-05-10 03:00:44 -07:00
- Add documentation comments for comments on columns in drift files.
2023-05-14 12:54:51 -07:00
- Fix modular generation not generating imports correctly with the latest analyzer.
2023-05-10 03:00:44 -07:00
2023-05-10 01:24:58 -07:00
## 2.8.0
2023-04-23 07:21:31 -07:00
- Support named constructors for existing row types in drift files ([#2399](https://github.com/simolus3/drift/issues/2399)).
2023-05-10 01:24:58 -07:00
- Fix compilation issues with `analyzer: 5.12.0` .
2023-04-23 07:21:31 -07:00
2023-04-10 14:33:36 -07:00
## 2.7.0
2023-03-23 09:56:50 -07:00
- Make `validateDatabaseSchema()` work in migration tests.
2023-03-25 08:29:07 -07:00
- Fix elements from transitive imports in drift files not being added reliably.
2023-03-23 09:56:50 -07:00
2023-03-20 13:39:41 -07:00
## 2.6.0
- Fix invalid schema verification code being generated for columns with a
`clientDefault` .
- Support drift 2.6.0
2023-02-08 01:58:53 -08:00
## 2.5.2
- Fix generated code for `blob` columns when modular generation is enabled.
2023-02-01 01:52:29 -08:00
## 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.
2023-01-29 23:58:59 -08:00
## 2.5.0+1
2023-01-05 14:04:36 -08:00
2023-01-06 05:27:15 -08:00
- Support `MAPPED BY` for individual columns in queries or in views defined with SQL.
2023-01-06 06:10:03 -08:00
- Consistently interpret `CAST (x AS DATETIME)` and `CAST(x AS TEXT)` in drift files.
2023-01-06 07:53:04 -08:00
- Support a `CAST` to an enum type in drift types.
2023-01-28 07:53:35 -08:00
- The `generate_connect_constructor` option is now deprecated, as a `DatabaseConnection`
can be passed whereever a `QueryExecutor` is used too.
2023-01-23 12:46:20 -08:00
- Support two different queries using `LIST()` columns having the same result class name.
2023-01-11 02:29:44 -08:00
- Fix table classes not extending defining Dart classes with modular generation.
- Fix `@UseDataClass` with `extending` not working with modular generation.
2023-01-27 07:30:05 -08:00
- 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.
2023-01-05 14:04:36 -08:00
2023-01-02 14:56:28 -08:00
## 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.
2022-12-28 14:15:12 -08:00
## 2.4.0
2022-11-28 02:59:00 -08:00
2022-12-28 14:15:12 -08:00
- Add support for `textEnum` columns in Dart (or `ENUMNAME` in `.drift` ) to store enum columns as text (via `Enum.name` ).
2022-12-02 23:55:58 -08:00
- 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` ).
2022-12-15 07:47:44 -08:00
- `drift_dev schema dump` can now dump the schema of existing sqlite3 database files as well.
2022-12-19 14:58:08 -08:00
- Warn about suspicious int or text literals being inserted into enum columns.
2022-12-27 13:26:31 -08:00
- Support [existing row types on queries ](https://drift.simonbinder.eu/docs/advanced-features/custom_row_classes/#queries )
defined in drift files.
2022-12-28 14:15:12 -08:00
- For Dart-defined columns, `customConstraint` s are now parsed and respected by the generator.
- It is now allowed to interleave queries and tables in a drift file.
2022-12-27 13:26:31 -08:00
- Experimental support for Dart records as existing row or query types. Please note that
2022-12-25 15:23:04 -08:00
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.
2022-11-30 06:47:58 -08:00
2022-12-12 13:39:00 -08:00
## 2.3.3
- Fix a crash in `schema generate` .
2022-11-29 01:39:45 -08:00
## 2.3.2
- Fix a builder crash when importing triggers or indices.
2022-11-28 12:59:17 -08:00
## 2.3.1
- Fix invalid code being generated through `drift_dev schema generate` .
2022-11-27 08:05:16 -08:00
## 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.
2022-11-28 02:59:00 -08:00
2022-10-06 13:56:25 -07:00
## 2.2.0+1
2022-09-08 13:54:43 -07:00
2022-09-27 12:30:12 -07:00
- __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.
2022-09-08 13:54:43 -07:00
2022-08-29 13:27:35 -07:00
## 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.
2022-08-21 04:47:00 -07:00
## 2.0.2
- Generate public typedefs for the signatures of `scoped_dart_components` ,
making it easier to re-use them for own methods.
2022-08-16 07:05:08 -07:00
## 2.0.1
2022-08-16 08:43:23 -07:00
- Recognize options for an applied `not_shared` builder when exporting schemas.
2022-08-16 07:05:08 -07:00
2022-08-13 13:11:20 -07:00
## 2.0.0
2022-06-22 14:56:15 -07:00
2022-07-03 12:53:17 -07:00
- Removes the following build options, which are always turned on now:
- `null_aware_type_converters`
- `new_sql_code_generation`
2022-09-05 04:54:47 -07:00
- `compact_query_methods`
2022-07-01 12:34:02 -07:00
- 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.
2022-06-22 14:56:15 -07:00
2022-08-09 14:17:59 -07:00
## 1.7.1
- Support the latest versions of the `analyzer` and `analyzer_plugin` packages.
2022-06-07 05:39:45 -07:00
## 1.7.0
- Support for new drift 1.7 features like `int64` columns.
- Analysis support for upcoming sqlite 3.39 features in `.drift` files.
2022-05-04 12:20:08 -07:00
## 1.6.0
2022-04-04 13:32:07 -07:00
- Write Dart references into schema files.
2022-05-04 12:20:08 -07:00
- Support new drift features from version 1.6.0, like `check` and `unique`
column constraints in Dart tables.
2022-04-04 13:32:07 -07:00
2022-03-15 11:41:45 -07:00
## 1.5.2
- Fix crash when reading dynamic type converters.
2022-03-14 13:27:36 -07:00
## 1.5.1
- Support migrations from `moor_flutter` to `drift_sqflite` in the `migrate`
command.
2022-03-13 07:54:45 -07:00
## 1.5.0
2022-03-01 09:10:19 -08:00
- Add `validateDatabaseSchema` extension to `api/migrations.dart` . It validates
that the schema of a database at runtime matches what one would expect.
2022-03-13 07:54:45 -07:00
- Allow cascade operators in the query for Dart-defined views.
2022-03-01 09:10:19 -08:00
2022-02-09 07:47:22 -08:00
## 1.4.0
2022-01-19 11:53:25 -08:00
2022-02-09 07:47:22 -08:00
- Generator support for the `LIST()` feature introduced in drift 1.4.
2022-01-19 11:53:25 -08:00
- Fix imported views in `.drift` files not being available in all cases.
2022-01-14 10:19:14 -08:00
## 1.3.0
- Support `drift` version `1.3.x` .
2022-01-10 07:26:50 -08:00
## 1.2.1
- Support the latest `analyzer` and `analyzer_plugin` packages.
2021-12-30 08:28:56 -08:00
## 1.2.0
- Generate code needed to support streams of views.
2021-12-23 08:38:49 -08:00
## 1.1.1
2021-12-19 10:45:20 -08:00
- Improve error handling around custom row classes.
2021-12-11 04:17:37 -08:00
## 1.1.0
2021-10-14 12:44:44 -07:00
2022-03-13 07:52:15 -07:00
- Consider `drift` -named files when generating schema migrations ([#1486](https://github.com/simolus3/drift/issues/1486))
2021-10-19 09:15:53 -07:00
- Emit correct SQL code when using arrays with the `new_sql_code_generation`
option in specific scenarios.
2021-11-24 14:11:59 -08:00
- Transform `.moor.dart` part files in the `migrate` command.
2021-10-14 12:44:44 -07:00
2021-10-13 13:08:38 -07:00
## 1.0.2
2021-10-12 08:36:10 -07:00
- Also transform `analysis_options.yaml` files in the `drift_dev migrate` command.
2021-10-12 05:26:53 -07:00
## 1.0.1
2021-10-11 06:55:01 -07:00
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 ](https://pub.dev/packages/moor_generator/changelog ).