Skip to content

Update a pre-populated sqlite database #553

Open
@jakob-fankhauser

Description

@jakob-fankhauser

Short: I tried to update the db file, delete the db file on the device and reopen it - however app (simulator) still uses the old db data.

When I make changes to the Database I want to update the Database in my App as well. So I copy the updated db file into the default www folders. Then on startup of the app I want to delete the existing (old) db file using:

SQLite.deleteDatabase({name: 'ChemoDatabase.db', location: 1}, () => {console.log('db deleted')}, error => {console.log('ERROR: ' + error);})

And reopen the updated db file inside the app with:

SQLite.openDatabase({name: 'ChemoDatabase.db', createFromLocation: 1});

However after that, the app still uses the outdated database which should be deleted with SQLite.deleteDatabase().
The only way I got the app to use the updated db file is by rebuilding the whole app...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions