Test file generated using make-migrations
doesn't compile
#3457
-
Followed the steps in the documentation to use the This is the error:
These are the relevant parts of my database class (basically a copy paste of the example here: https://drift.simonbinder.eu/setup/#database-class)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The tests expect that your database is set up like this to allow passing a custom connection: class DriftAppDatabase extends _$DriftAppDatabase {
DriftAppDatabase([QueryExecutor? e]) : super(e ?? _openConnection()); I think we should add a check in the command that warns about this if the database has no arguments in its default constructor (and also fix the snippets on the documentation site to align with the format expected by the tests). |
Beta Was this translation helpful? Give feedback.
The tests expect that your database is set up like this to allow passing a custom connection:
I think we should add a check in the command that warns about this if the database has no arguments in its default constructor (and also fix the snippets on the documentation site to align with the format expected by the tests).