mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-03 22:58:24 +02:00
MINOR FIX: precision values now handled better
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86512 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5c0b83f046
commit
c62c93999f
@ -365,7 +365,6 @@ abstract class Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($newTable || !isset($this->indexList[$table][$index_alt])) {
|
if($newTable || !isset($this->indexList[$table][$index_alt])) {
|
||||||
$this->transCreateIndex($table, $index, $spec);
|
$this->transCreateIndex($table, $index, $spec);
|
||||||
Database::alteration_message("Index $table.$index: created as $spec","created");
|
Database::alteration_message("Index $table.$index: created as $spec","created");
|
||||||
@ -418,9 +417,11 @@ abstract class Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the value of this field.
|
// Get the value of this field.
|
||||||
if(is_array($spec))
|
if(is_array($spec)){
|
||||||
$specValue=$spec['data_type'];
|
$specValue=$spec['data_type'];
|
||||||
else $specValue=$spec;
|
if(isset($spec['precision']))
|
||||||
|
$specValue.='(' . $spec['precision'] . ')';
|
||||||
|
} else $specValue=$spec;
|
||||||
|
|
||||||
// We need to get db-specific versions of the ID column:
|
// We need to get db-specific versions of the ID column:
|
||||||
if($spec_orig==DB::getConn()->IdColumn() || $spec_orig==DB::getConn()->IdColumn(true))
|
if($spec_orig==DB::getConn()->IdColumn() || $spec_orig==DB::getConn()->IdColumn(true))
|
||||||
|
Loading…
Reference in New Issue
Block a user