drift
drift copied to clipboard
drift_flutter force to use ".sqlite" suffix
Because of
return File(p.join(dbFolder.path, '$name.sqlite'));
Old databases can't not be changed or reused if the old file does not contains .sqlite. So old database and data is lost (my case).
Solution:
Add a named parameter extension or remove the '.sqlite' part.
You can use driftDatabase(native: DriftNativeOptions(databasePath: () async => ...)) to migrate to drift_flutter while otherwise keeping your existing database path.
I will update the documentation to mention how to migrate from the old setup to drift_flutter, but I'm not sure where to put it yet.