Skip to content

Commit

Permalink
Don't use original LIMIT but original precision and scale when buildi…
Browse files Browse the repository at this point in the history
…ng SQL for an existing column.
  • Loading branch information
yunosh committed May 19, 2014
1 parent a707098 commit ca2a676
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php
Expand Up @@ -429,7 +429,9 @@ public function changeColumn($tableName, $columnName, $type, $options = array())

$old = $this->typeToSql(
$column->getType(),
is_null($options['limit']) ? null : $column->getLimit(),
$column->getType() == 'integer' || is_null($options['limit'])
? null
: $column->getLimit(),
is_null($options['precision']) ? null : $column->precision(),
is_null($options['scale']) ? null : $column->scale(),
is_null($options['unsigned']) ? null : $column->isUnsigned()
Expand Down Expand Up @@ -458,7 +460,7 @@ public function changeColumn($tableName, $columnName, $type, $options = array())
. ' '
. $this->typeToSql(
$column->getType(),
$column->getLimit(),
$column->getType() == 'integer' ? null : $column->getLimit(),
$column->precision(),
$column->scale(),
$column->isUnsigned()
Expand Down

0 comments on commit ca2a676

Please sign in to comment.