Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix/2 0 migration when no challenges #245

Merged
merged 2 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MigrationV1ToV2Bloc
return;
}

if (v1BooksDbPath == null && v1YearsDbPath == null) {
if (v1BooksDbPath == null) {
if (event.retrigger) {
_showSnackbar(event.context, 'Migration error 1');
}
Expand All @@ -45,13 +45,7 @@ class MigrationV1ToV2Bloc

emit(const MigrationOnging());

if (v1BooksDbPath != null) {
await _migrateBooksFromV1ToV2(v1BooksDbPath);
} else {
if (event.retrigger) {
_showSnackbar(event.context, 'Migration error 2');
}
}
await _migrateBooksFromV1ToV2(v1BooksDbPath);

if (v1YearsDbPath != null) {
await _migrateYearsFromV1ToV2(event.context, v1YearsDbPath);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A new Flutter project.

publish_to: 'none'

version: 2.0.2+42
version: 2.0.3+43

environment:
sdk: '>=2.18.2 <3.0.0'
Expand Down