Also describe how to import backups

This commit is contained in:
Simon Binder 2022-05-28 13:57:56 +02:00
parent cbcde53da6
commit 5474ac22be
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
1 changed files with 7 additions and 0 deletions

View File

@ -95,3 +95,10 @@ Future<void> exportInto(File file) async {
You can now export this file containing the database of your app with another
package like `flutter_share` or other backup approaches.
To import a database file into your app's database at runtime, you can use the
following approach:
1. use the `sqlite3` package to open the backup database file.
2. run the `VACUUM INTO ?` statement on the backup database, targetting the
path of your application's database (the one you pass to `NativeDatabase`).