mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Added automatic upgrade (cipher_migrate) of the sqlite database.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7581 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d0238810b7
commit
1d6bf4190e
1 changed files with 13 additions and 1 deletions
|
@ -66,6 +66,18 @@ RetroDb::RetroDb(const std::string &dbPath, int flags, const std::string& key) :
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
char *err = NULL;
|
||||||
|
rc = sqlite3_exec(mDb, "PRAGMA cipher_migrate;", NULL, NULL, &err);
|
||||||
|
if (rc != SQLITE_OK)
|
||||||
|
{
|
||||||
|
std::cerr << "RetroDb::RetroDb(): Error upgrading database, error code: " << rc;
|
||||||
|
if (err)
|
||||||
|
{
|
||||||
|
std::cerr << ", " << err;
|
||||||
|
}
|
||||||
|
std::cerr << std::endl;
|
||||||
|
sqlite3_free(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue