Skip to content
Snippets Groups Projects
Commit 88e6f5c3 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #9292 from owncloud/issue/9161

Use get random bytes as uniqeid() is not unique in some cases
parents a67d2437 0c711e1c
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,7 @@ class Migrator {
* @return string
*/
protected function generateTemporaryTableName($name) {
return 'oc_' . $name . '_' . uniqid();
return 'oc_' . $name . '_' . \OCP\Util::generateRandomBytes(13);
}
/**
......@@ -133,7 +133,7 @@ class Migrator {
$indexName = $index->getName();
} else {
// avoid conflicts in index names
$indexName = 'oc_' . uniqid();
$indexName = 'oc_' . \OCP\Util::generateRandomBytes(13);
}
$newIndexes[] = new Index($indexName, $index->getColumns(), $index->isUnique(), $index->isPrimary());
}
......
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