drift icon indicating copy to clipboard operation
drift copied to clipboard

FTS5 extension not working when adding to existing project until reinstalled

Open sverma95 opened this issue 5 years ago • 2 comments

I previously was using the SQFlite package in my project, now I upgraded it to Moor and was adding a new virtual table using FTS5 extension. The table got created and was populated with the data too, but then the match queries are not working on it. I used customSelectQuery method to make calls to the database. I got no result as the MATCH keyword probably failed. So then I decided to clear the storage and uninstall the app from the emulator and reinstall, this time the everything worked perfectly. I think only clearing the storage would suffice too as the SQLite DB that was already present, would be removed.

I'm not sure why this is happening. Can you suggest something on how I could solve this or deal with this when providing an incremental update?

sverma95 avatar Feb 18 '20 08:02 sverma95

Thanks for the report, I'll look into it. You're using moor_ffi, correct? Did this happen on Android or iOS? Did you create the virtual table after migrating to moor?

simolus3 avatar Feb 18 '20 10:02 simolus3

Yes, I'm using moor_ffi. I faced this issue on both Android and iOS. I didn't have any virtual table prior to using Moor. I created the private table and the virtual table using FTS5 when I was migrating my project, I didn't have Moor integrated before this.

sverma95 avatar Feb 18 '20 19:02 sverma95