flutterings / sqflite_migration

Library to manage sqlite db migrations.
https://efthymis.com/migrating-a-mobile-database-in-flutter-sqlite/
Other
47 stars 18 forks source link

fixes #1 #6

Closed rinatsolmano closed 4 years ago

rinatsolmano commented 4 years ago

Closes #1
Based on open_database_with_migration.dart new version of database every time will be equal migrations.length + 1. Situation when we'll perform migration to the version lesser than migrations.length + 1 looks impossible, because of the way we determine the current version.

In this case assertion should check it in the manner suggested by the current PR.

rinatsolmano commented 4 years ago

The suggestion has been perfectly tested in the production Flutter project.