Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordova-sqlite-plugin and existing database #76

Open
davguev opened this issue Oct 31, 2018 · 3 comments
Open

cordova-sqlite-plugin and existing database #76

davguev opened this issue Oct 31, 2018 · 3 comments

Comments

@davguev
Copy link

davguev commented Oct 31, 2018

Hello!
I have an app which uses cordova-sqlite-plugin for its database.

  1. If I install cordova-sqlcipher-adapter, can I remove the first plugin? Or do I need both? I tried removing the sqlite-plugin and the app couldn't find the object sqlitePlugin.
  2. If the app has already its database X without cipher, and then install a new version of the app with the cipher, does it cipher the existing database X? If it's doesn't do it automatically, how can I achieve it without deleting the data already stored?
@brodycj
Copy link
Collaborator

brodycj commented Nov 29, 2018

  1. cordova-sqlcipher-adapter, can I remove the first plugin?

Yes and you better remove the other plugin first. Keeping both plugins would lead to undefined behavior.

2. does it cipher the existing database X?

No. You would open the database using no password key option.

2. how can I achieve it without deleting the data already stored?

I recommend you read the data with no key and store it in a new database using your secret password key.

SQLCipher has migration support, which is not directly supported by this plugin.

@mknnaren
Copy link

mknnaren commented Dec 4, 2018

Hi,

Could you please add this information of removing cordova-sqlite-plugin before installing your plugin in readme file. Even I was debugging for long time on why this was not working until I hit this issue.

Thank you,
Naren

@sachinkumaram-veoci
Copy link

@davguev Could you guide me on how to migrate data from one DB to secure DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants