Skip to content

Commit

Permalink
fix: association field in media default folder config
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpoensgen committed May 7, 2023
1 parent 7479a40 commit 9abbf5a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/Migration/Migration1683477576.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace SptecOrderComments\Migration;

use Doctrine\DBAL\Connection;
use Shopware\Core\Defaults;
use Shopware\Core\Framework\Migration\MigrationStep;

class Migration1683477576 extends MigrationStep
{
public function getCreationTimestamp(): int
{
return 1683477576;
}

public function update(Connection $connection): void
{
$query = <<<SQL
UPDATE `media_default_folder` SET `association_fields` = :associationFields WHERE `entity` = :entity;
SQL;

$connection->executeStatement($query, [
'associationFields' => '["sptecOrderComments"]',
'entity' => 'sptec_order_comment',
]);
}

public function updateDestructive(Connection $connection): void
{
}
}

0 comments on commit 9abbf5a

Please sign in to comment.