Bad check on existing urlhash key

This commit is contained in:
Mikael Nordfeldth 2015-02-19 19:36:59 +01:00
parent 8ac8e2e734
commit e299583eee

View File

@ -619,7 +619,7 @@ class File extends Managed_DataObject
$schemadef = $schema->getTableDef($table);
// 2015-02-19 We have to upgrade our table definitions to have the urlhash field populated
if (isset($schemadef['fields']['urlhash']) && in_array('file_urlhash_key', $schemadef['unique keys'])) {
if (isset($schemadef['fields']['urlhash']) && isset($schemadef['unique keys']['file_urlhash_key'])) {
// We already have the urlhash field, so no need to migrate it.
return;
}