-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration not created for Sqlite Database when extending Model after upgrade to 3.0 #343
Comments
@iliraga I'm so sorry for the delay; I thought I'd responded much earlier. Very sorry. A couple clarifying questions:
Again, sorry for not getting to you sooner. |
@iliraga Could you please upgrade to |
@iliraga heads up, I'm going to close this ticket next week. Hoping this fix worked for you |
Hi @tshedor sorry somehow I missed your comments as well. I did the manual fix a while ago by manually generating the migration (very carefully). Unfortunately this is so long ago, that I can't properly reproduce the same situation again, so let's leave it at that for now. Thanks! |
Because of the whole setup it would be a little hard to provide a working sample of this, so I try to explain the issue as best as possible.
There is an entity, in our case
user.model.dart
which has a list of various annotations:What I did now, is to extend that particular model class with a new property:
final bool? isNew
(and extended the constructor as well).Before doing the upgrade to brick 3, it usually was enough to run the
dart run build_runner build
command. This generated the actualuser_adapter.g.dart
anduser.model.g.dart
file, and in addition a database migration including the changed database schema and the actual change in the table (anInsertColumn
-command basically).In my understanding the first two files were generated by the
rest
-subpackage, whereas the latter one was generated by thesqlite
subpackage.The first part works like usually, as proof here the
git status
-result. Even the changes itself within those files look reasonable:detailed GIT DIFF showing all changes autogenerated
but there is no migration created in this case, hence the actual synchronisation fails (storing it in the database). The retrieval from the remote-source works (e.g. retrieval from the rest service).
In the
migration to 3
-guide I didn't find anything related there. All the steps like importing different packages, or converting theRestSerializable
endpoint
-property with an actualrequestTransformer
seems to have worked (although that part is working, as explained before). Am I missing something here?In addition the related packages and it versions:
flutter doctor
shows the following:If relevant, the
build.yaml
:The text was updated successfully, but these errors were encountered: