return Update::FAILED;
}
- if (!DBA::e("DELETE FROM `profile_check` WHERE NOT `uid` IN (SELECT `uid` FROM `user`)")) {
+ if (DBStructure::existsTable('profile_check') && !DBA::e("DELETE FROM `profile_check` WHERE NOT `uid` IN (SELECT `uid` FROM `user`)")) {
return Update::FAILED;
}
return Update::FAILED;
}
- if (!DBA::e("DELETE FROM `profile_check` WHERE NOT `cid` IN (SELECT `id` FROM `contact`)")) {
+ if (DBStructure::existsTable('profile_check') && !DBA::e("DELETE FROM `profile_check` WHERE NOT `cid` IN (SELECT `id` FROM `contact`)")) {
return Update::FAILED;
}
return Update::SUCCESS;
}
+
+function update_1434()
+{
+ $name = DI::config()->get('storage', 'name');
+
+ // in case of an empty config, set "Database" as default storage backend
+ if (empty($name)) {
+ DI::config()->set('storage', 'name', Storage\Database::getName());
+ }
+
+ // In case of a Using deprecated storage class value, set the right name for it
+ if (stristr($name, 'Friendica\Model\Storage\\')) {
+ DI::config()->set('storage', 'name', substr($name, 24));
+ }
+
+ return Update::SUCCESS;
+}