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