Skip to content
Snippets Groups Projects
Commit 317cd4c7 authored by Robin Appelman's avatar Robin Appelman
Browse files

catch error if old filecache table is not present during upgrade

parent 98f42d31
Branches
No related tags found
No related merge requests found
......@@ -15,7 +15,11 @@ class Upgrade {
$insertQuery = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache`( `fileid`, `storage`, `path`, `path_hash`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted` )
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
try {
$oldEntriesQuery = \OC_DB::prepare('SELECT * FROM `*PREFIX*fscache` ORDER BY `id` ASC'); //sort ascending to ensure the parent gets inserted before a child
} catch (\Exception $e) {
return;
}
try {
$oldEntriesResult = $oldEntriesQuery->execute();
} catch (\Exception $e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment