Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function findForObject(Concrete $product, string $fieldName): array
public function findForObjectAndStore(
Concrete $product,
string $fieldName,
StoreInterface $store
StoreInterface $store,
): ?ProductStoreValuesInterface {
return $this->createQueryBuilder('o')
->andWhere('o.product = :product')
Expand All @@ -71,6 +71,6 @@ public function findForObjectAndStore(
->setParameter('fieldName', $fieldName)
->getQuery()
->getOneOrNullResult()
;
;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

declare(strict_types=1);

/*
* CoreShop
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - CoreShop Commercial License (CCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
*
*/

namespace CoreShop\Bundle\CoreBundle\Migrations;

use Doctrine\DBAL\Schema\Schema;
Expand All @@ -23,9 +37,9 @@ public function up(Schema $schema): void
return;
}

$this->addSql("ALTER TABLE coreshop_product_store_values ADD fieldName VARCHAR(255) NOT NULL;");
$this->addSql("DROP INDEX product_store ON coreshop_product_store_values;");
$this->addSql("CREATE UNIQUE INDEX product_store ON coreshop_product_store_values (product, store, fieldName);");
$this->addSql('ALTER TABLE coreshop_product_store_values ADD fieldName VARCHAR(255) NOT NULL;');
$this->addSql('DROP INDEX product_store ON coreshop_product_store_values;');
$this->addSql('CREATE UNIQUE INDEX product_store ON coreshop_product_store_values (product, store, fieldName);');
$this->addSql("UPDATE coreshop_product_store_values SET fieldName='storeValues';");
}

Expand Down