Skip to content

Commit

Permalink
Merge pull request #245 from mateusz-bak/fix/2_0_migration_when_no_ch…
Browse files Browse the repository at this point in the history
…allenges

Fix/2 0 migration when no challenges
  • Loading branch information
mateusz-bak authored Mar 17, 2023
2 parents f754e86 + 33a88bd commit d550869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
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

0 comments on commit d550869

Please # to comment.