diff --git a/src/Marello/Bundle/SalesBundle/Entity/SalesChannel.php b/src/Marello/Bundle/SalesBundle/Entity/SalesChannel.php index 51294f5dc..e8e10c9ac 100644 --- a/src/Marello/Bundle/SalesBundle/Entity/SalesChannel.php +++ b/src/Marello/Bundle/SalesBundle/Entity/SalesChannel.php @@ -400,7 +400,7 @@ public function getIntegrationChannel() * @param Channel $integrationChannel * @return $this */ - public function setIntegrationChannel(Channel $integrationChannel) + public function setIntegrationChannel(Channel $integrationChannel = null) { $this->integrationChannel = $integrationChannel; diff --git a/src/Marello/Bundle/SalesBundle/Migrations/Schema/MarelloSalesBundleInstaller.php b/src/Marello/Bundle/SalesBundle/Migrations/Schema/MarelloSalesBundleInstaller.php index 359036121..4edbc9d0c 100644 --- a/src/Marello/Bundle/SalesBundle/Migrations/Schema/MarelloSalesBundleInstaller.php +++ b/src/Marello/Bundle/SalesBundle/Migrations/Schema/MarelloSalesBundleInstaller.php @@ -17,7 +17,7 @@ class MarelloSalesBundleInstaller implements Installation */ public function getMigrationVersion() { - return 'v1_2'; + return 'v1_3'; } /** @@ -73,7 +73,6 @@ protected function createMarelloSalesSalesChannelTable(Schema $schema) $table->addColumn('integration_channel_id', 'integer', ['notnull' => false]); $table->setPrimaryKey(['id']); $table->addUniqueIndex(['code'], 'marello_sales_sales_channel_codeidx'); - $table->addUniqueIndex(['integration_channel_id'], 'UNIQ_75C456C9F5B7AF7511'); $table->addIndex(['owner_id'], 'idx_37c71d17e3c61f9', []); } diff --git a/src/Marello/Bundle/SalesBundle/Migrations/Schema/v1_3/MarelloSalesBundle.php b/src/Marello/Bundle/SalesBundle/Migrations/Schema/v1_3/MarelloSalesBundle.php new file mode 100644 index 000000000..f668a56ef --- /dev/null +++ b/src/Marello/Bundle/SalesBundle/Migrations/Schema/v1_3/MarelloSalesBundle.php @@ -0,0 +1,35 @@ +modifyMarelloSalesSalesChannelTable($schema); + } + + /** + * @param Schema $schema + */ + protected function modifyMarelloSalesSalesChannelTable(Schema $schema) + { + $table = $schema->getTable('marello_sales_sales_channel'); + if ($table->hasIndex('UNIQ_75C456C9F5B7AF7511')) { + $table->dropIndex('UNIQ_75C456C9F5B7AF7511'); + } + } + +}