The database version in my app has changed. So I was trying to migrate old data to new database. My methods work fine on Android emulator and iOS simulator & device. But on Android device (Samsung A01 running Android 10) I am getting the above mentioned error. This is what I am doing:
- I read the data from old version database
- Convert the data to new version by adding default values to the new columns. I'm not yet writing this new data to new database.
- Now I recreate the database with new schema. This creates some new tables also.
- Then I add some default data rows to the new tables.
- Then I refresh in memory VMs that hold these data.
- Then modify the default values added to the new columns to one of the data added in step 4 above.
- Then write the new updated data to the new database tables.
This error is occurring in step 4. It is not inserting the default data rows to the new tables. I don't understand the meaning of 'no more rows available' in this context. I just read all data in a table by using the following code in DBOps class:
public async Task<List<GroupName>> GetAllGroupsAsync()
return await dbConn.Table<GroupName>().ToListAsync();