mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: unique versioned indexes are now converted to standard indexes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113299 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
46dcd20e34
commit
92c7419767
@ -285,6 +285,13 @@ class Versioned extends DataObjectDecorator {
|
||||
(array)$fields
|
||||
);
|
||||
|
||||
//Unique indexes will not work on versioned tables, so we'll convert them to standard indexes:
|
||||
foreach($indexes as $key=>$index){
|
||||
if(is_array($index) && strtolower($index['type'])=='unique'){
|
||||
$indexes[$key]['type']='index';
|
||||
}
|
||||
}
|
||||
|
||||
$versionIndexes = array_merge(
|
||||
array(
|
||||
'RecordID_Version' => array('type' => 'unique', 'value' => 'RecordID,Version'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user