-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shopsys] moved migration of stock settings from project-base to fram…
…ework (#3401)
- Loading branch information
1 parent
8a516d8
commit a5e1453
Showing
1 changed file
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shopsys\FrameworkBundle\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Shopsys\MigrationBundle\Component\Doctrine\Migrations\AbstractMigration; | ||
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
|
||
class Version20240827110317 extends AbstractMigration implements ContainerAwareInterface | ||
{ | ||
use MultidomainMigrationTrait; | ||
|
||
/** | ||
* @param \Doctrine\DBAL\Schema\Schema $schema | ||
*/ | ||
public function up(Schema $schema): void | ||
{ | ||
if ($this->isAppMigrationNotInstalledRemoveIfExists('Version20200129140317')) { | ||
foreach ($this->getAllDomainIds() as $domainId) { | ||
$this->sql( | ||
'INSERT INTO "setting_values" ("name", "domain_id", "value", "type") VALUES | ||
(\'transferDaysBetweenStocks\', :domainId, \'1\', \'integer\')', | ||
['domainId' => $domainId], | ||
); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* @param \Doctrine\DBAL\Schema\Schema $schema | ||
*/ | ||
public function down(Schema $schema): void | ||
{ | ||
} | ||
} |