-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #962 from dpfaffenbauer/store-price-performance
[CoreBundle] add index to StorePrice Entity for better performance
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/CoreShop/Bundle/CoreBundle/Migrations/Version20190430134834.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,31 @@ | ||
<?php | ||
|
||
namespace CoreShop\Bundle\CoreBundle\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Pimcore\Migrations\Migration\AbstractPimcoreMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20190430134834 extends AbstractPimcoreMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
$this->addSql('ALTER TABLE coreshop_product_store_price CHANGE property property VARCHAR(190) NOT NULL;'); | ||
$this->addSql('CREATE INDEX IDX_514E3EBF367996058BF21CDE ON coreshop_product_store_price (productId, property);'); | ||
$this->addSql('CREATE INDEX IDX_514E3EBF367996052F738A528BF21CDE ON coreshop_product_store_price (productId, storeId, property);'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
|
||
} | ||
} |
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