From fb6d0185c42e905fa1e24bc7bddec3a44dad148b Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Wed, 16 Nov 2022 14:10:16 +0100 Subject: [PATCH] [Migrations] Remove usage of non existent AbstractMigration --- app/migrations/Version20161209095131.php | 6 +++++- .../Bundle/CoreBundle/Migrations/Version20161209095131.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/migrations/Version20161209095131.php b/app/migrations/Version20161209095131.php index 944035a3db..8d4f52623e 100644 --- a/app/migrations/Version20161209095131.php +++ b/app/migrations/Version20161209095131.php @@ -14,17 +14,21 @@ declare(strict_types=1); namespace Sylius\Migrations; use Doctrine\DBAL\Schema\Schema; -use Sylius\Bundle\CoreBundle\Doctrine\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; class Version20161209095131 extends AbstractMigration { public function up(Schema $schema): void { + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + $this->addSql("UPDATE sylius_zone SET scope = 'all' WHERE scope IS NULL"); } public function down(Schema $schema): void { + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + $this->addSql("UPDATE sylius_zone SET scope = NULL WHERE scope = 'all'"); } } diff --git a/src/Sylius/Bundle/CoreBundle/Migrations/Version20161209095131.php b/src/Sylius/Bundle/CoreBundle/Migrations/Version20161209095131.php index ae5debf1cc..e7daea04ff 100644 --- a/src/Sylius/Bundle/CoreBundle/Migrations/Version20161209095131.php +++ b/src/Sylius/Bundle/CoreBundle/Migrations/Version20161209095131.php @@ -14,17 +14,21 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Migrations; use Doctrine\DBAL\Schema\Schema; -use Sylius\Bundle\CoreBundle\Doctrine\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; class Version20161209095131 extends AbstractMigration { public function up(Schema $schema): void { + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + $this->addSql("UPDATE sylius_zone SET scope = 'all' WHERE scope IS NULL"); } public function down(Schema $schema): void { + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + $this->addSql("UPDATE sylius_zone SET scope = NULL WHERE scope = 'all'"); } }