forked from marellocommerce/marello
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bug/MAR10001-tax-unique-index-fix' into dev
- Loading branch information
Showing
10 changed files
with
124 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Marello/Bundle/CatalogBundle/Migrations/Schema/v1_1_1/MarelloCatalogBundle.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Marello\Bundle\CatalogBundle\Migrations\Schema\v1_1_1; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
use Oro\Bundle\MigrationBundle\Migration\Migration; | ||
use Oro\Bundle\MigrationBundle\Migration\QueryBag; | ||
|
||
class MarelloCatalogBundle implements Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up(Schema $schema, QueryBag $queries) | ||
{ | ||
/** Tables generation **/ | ||
$this->updateCatalogCategoryTable($schema); | ||
} | ||
|
||
/** | ||
* Create marello_catalog_category table | ||
* | ||
* @param Schema $schema | ||
*/ | ||
protected function updateCatalogCategoryTable(Schema $schema) | ||
{ | ||
$table = $schema->getTable('marello_catalog_category'); | ||
if ($table->hasIndex('UNIQ_C4B343DF77153098')) { | ||
$table->renameIndex('UNIQ_C4B343DF77153098', 'marello_catalog_category_codeidx'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/Marello/Bundle/TaxBundle/Migrations/Schema/v1_3_1/MarelloTaxBundle.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
namespace Marello\Bundle\TaxBundle\Migrations\Schema\v1_3_1; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
use Oro\Bundle\MigrationBundle\Migration\Migration; | ||
use Oro\Bundle\MigrationBundle\Migration\QueryBag; | ||
|
||
class MarelloTaxBundle implements Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up(Schema $schema, QueryBag $queries) | ||
{ | ||
/** Tables generation **/ | ||
$this->updateMarelloTaxCodeTable($schema); | ||
$this->updateMarelloTaxJurisdictionTable($schema); | ||
$this->updateMarelloTaxRateTable($schema); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @param Schema $schema | ||
*/ | ||
protected function updateMarelloTaxCodeTable(Schema $schema) | ||
{ | ||
$table = $schema->getTable('marello_tax_tax_code'); | ||
if ($table->hasIndex('uniq_marello_tax_tax_code_code')) { | ||
$table->renameIndex('uniq_marello_tax_tax_code_code', 'marello_tax_code_codeidx'); | ||
} | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @param Schema $schema | ||
*/ | ||
protected function updateMarelloTaxJurisdictionTable(Schema $schema) | ||
{ | ||
$table = $schema->getTable('marello_tax_tax_jurisdiction'); | ||
if ($table->hasIndex('UNIQ_2CBEF9AE77153098')) { | ||
$table->renameIndex('UNIQ_2CBEF9AE77153098', 'marello_tax_jurisdiction_codeidx'); | ||
} | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @param Schema $schema | ||
*/ | ||
protected function updateMarelloTaxRateTable(Schema $schema) | ||
{ | ||
$table = $schema->getTable('marello_tax_tax_rate'); | ||
if ($table->hasIndex('uniq_marello_tax_tax_rate_code')) { | ||
$table->renameIndex('uniq_marello_tax_tax_rate_code', 'marello_tax_rate_codeidx'); | ||
} | ||
} | ||
} |