From ca2a67662b5c95833a3bc84095f3abd9638e9210 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 19 May 2014 15:45:23 +0200 Subject: [PATCH] Don't use original LIMIT but original precision and scale when building SQL for an existing column. --- framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php index e6f39ed4241..a5d48bcb2d2 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php @@ -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() @@ -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()