diff --git a/Setup/UpgradeSchema.php b/Setup/UpgradeSchema.php index af4557c8..68a5490f 100644 --- a/Setup/UpgradeSchema.php +++ b/Setup/UpgradeSchema.php @@ -380,17 +380,22 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con // TODO: Consolidate with initial table creation above if (version_compare($context->getVersion(), '2.0.3', '<')) { - $setup->getConnection()->changeColumn( - $setup->getTable('avatax_cross_border_class'), - 'cross_border_type', - 'cross_border_type_id', - [ - 'type' => 'integer', - 'unsigned' => true, - 'nullable' => true, - 'length' => 11, - ] - ); + if ($setup->getConnection()->tableColumnExists( + 'avatax_cross_border_class', + 'cross_border_type' + )) { + $setup->getConnection()->changeColumn( + $setup->getTable('avatax_cross_border_class'), + 'cross_border_type', + 'cross_border_type_id', + [ + 'type' => 'integer', + 'unsigned' => true, + 'nullable' => true, + 'length' => 11, + ] + ); + } } if (version_compare($context->getVersion(), '2.0.4', '<')) {