DDC-761 - Fix join columns not using the same lengh, precision and scale for string and decimal types.
This commit is contained in:
parent
13da816f4e
commit
4727489134
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
@ -442,6 +440,12 @@ class SchemaTool
|
|||||||
if (isset($joinColumn['nullable'])) {
|
if (isset($joinColumn['nullable'])) {
|
||||||
$columnOptions['notnull'] = !$joinColumn['nullable'];
|
$columnOptions['notnull'] = !$joinColumn['nullable'];
|
||||||
}
|
}
|
||||||
|
if ($fieldMapping['type'] == "string") {
|
||||||
|
$columnOptions['length'] = $fieldMapping['length'];
|
||||||
|
} else if ($fieldMapping['type'] == "decimal") {
|
||||||
|
$columnOptions['scale'] = $fieldMapping['scale'];
|
||||||
|
$columnOptions['precision'] = $fieldMapping['precision'];
|
||||||
|
}
|
||||||
|
|
||||||
$theJoinTable->addColumn(
|
$theJoinTable->addColumn(
|
||||||
$columnName, $class->getTypeOfColumn($joinColumn['referencedColumnName']), $columnOptions
|
$columnName, $class->getTypeOfColumn($joinColumn['referencedColumnName']), $columnOptions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user