diff options
-rw-r--r-- | connectivity/source/drivers/firebird/Table.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/connectivity/source/drivers/firebird/Table.cxx b/connectivity/source/drivers/firebird/Table.cxx index d32066f91d2b..3f999177561e 100644 --- a/connectivity/source/drivers/firebird/Table.cxx +++ b/connectivity/source/drivers/firebird/Table.cxx @@ -11,6 +11,7 @@ #include "Table.hxx" #include <comphelper/sequence.hxx> +#include <connectivity/dbtools.hxx> #include <connectivity/TIndexes.hxx> #include <connectivity/TKeys.hxx> @@ -115,7 +116,16 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, getConnection()->createStatement()->execute(sSql); } - if (bTypeChanged || bTypeNameChanged || bPrecisionChanged || bScaleChanged + if (bTypeChanged || bTypeNameChanged) + { + OUString sSql(getAlterTableColumn(rColName) + "TYPE " + + ::dbtools::createStandardTypePart(rDescriptor, getConnection())); + getConnection()->createStatement()->execute(sSql); + // TODO: could cause errors e.g. if incompatible types, deal with them here as appropriate. + // possibly we have to wrap things in Util::evaluateStatusVector. + } + + if (bPrecisionChanged || bScaleChanged || bIsNullableChanged || bIsAutoIncrementChanged) { // TODO: changeType |