You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error while upgrading from 4.5.2 to 4.5.3: Failed to update database structure #664
While upgrading from 4.5.2 to 4.5.3 the following 2 error messages are logged:
{"app":"core","message":"Failed to update database structure (MDB2 Error: unknown error, _doQuery: [Error message: Could not execute statement]\n[Last executed query: SELECT sql FROM sqlite_master WHERE type='table' AND name='oc_appconfig']\n[Native code: 5]\n[Native message: database is locked]\n)","level":4,"time":1352926012}
And 2 seconds later:
{"app":"core","message":"Failed to get existing database structure for upgrading (MDB2 Error: unknown error, _doQuery: [Error message: Could not execute statement]\n[Last executed query: SELECT name FROM sqlite_master WHERE type='table' AND sql NOT NULL AND name!='sqlite_sequence' ORDER BY name]\n[Native code: 5]\n[Native message: database is locked]\n)","level":4,"time":1352926014}
repeating the sql statements manually, just works (now):
printf "SELECT sql FROM sqlite_master WHERE type='table' AND name='oc_appconfig';" | sqlite3 data/owncloud.db
CREATE TABLE "oc_appconfig" ("appid" VARCHAR(32) DEFAULT ' ' NOT NULL, "configkey" VARCHAR(64) DEFAULT ' ' NOT NULL, "configvalue" LONGTEXT NOT NULL)
and
printf "SELECT name FROM sqlite_master WHERE type='table' AND sql NOT NULL AND name!='sqlite_sequence' ORDER BY name;" | sqlite3 data/owncloud.db
oc_appconfig
oc_bookmarks
.....
oc_sharing
oc_shorty
oc_users
How do I verify that the database has been evolved from the 4.5.2 structure to 4.5.3 correctly (or not). What is still to be done?
@osos the database upgrade can be triggered by setting the version in config/config.php to a version lower than what is defined in the getVersion() method around line 98 in lib/util.php. Setting it to '4.90.1' should do the trick for oc stable.
@DeepDiver1975 Sorry, I did not yet run into locking issues with sqlite. But I wanted to test the upgrade for tokenized share links anyway ...
@butonic: I lowered my version number in config/config.php, after making a backup of my database. When I entered the url of my OC instance, it reported an error.... Upgrading an already (or partly upgraded) database may result in errors....
Activity
osos commentedon Dec 1, 2012
I had the same issue upgrading from 4.5.1 to 4.5.2.
It would be nice to have a possibility to rerun database upgrade.
DeepDiver1975 commentedon Dec 3, 2012
@butonic If I recall correctly you faced something like this - right? THX
butonic commentedon Dec 3, 2012
@osos the database upgrade can be triggered by setting the version in config/config.php to a version lower than what is defined in the getVersion() method around line 98 in lib/util.php. Setting it to '4.90.1' should do the trick for oc stable.
@DeepDiver1975 Sorry, I did not yet run into locking issues with sqlite. But I wanted to test the upgrade for tokenized share links anyway ...
radoeka commentedon Dec 3, 2012
@butonic: I lowered my version number in config/config.php, after making a backup of my database. When I entered the url of my OC instance, it reported an error.... Upgrading an already (or partly upgraded) database may result in errors....
karlitschek commentedon Dec 14, 2012
I think this should be fixed with 4.5.4 Could you try again with the latest version please?
radoeka commentedon Dec 15, 2012
@karlitschek: I tried it again. This time no warnings or errors. All seems well.
karlitschek commentedon Dec 15, 2012
solved