Skip to content

Test file generated using make-migrations doesn't compile #3457

Answered by simolus3
joseph-neeraj asked this question in Q&A
Discussion options

You must be logged in to vote

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).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joseph-neeraj
Comment options

Answer selected by joseph-neeraj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants