Skip to content

Commit

Permalink
bug #14545 [Migrations] Remove usage of non existent AbstractMigratio…
Browse files Browse the repository at this point in the history
…n (GSadee)

This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11|
| Bug fix?        | yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no|
| Related tickets | after #13187 |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.11 or 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------

fb6d018 [Migrations] Remove usage of non existent AbstractMigration
  • Loading branch information
coldic3 authored Nov 16, 2022
2 parents f6ff6be + fb6d018 commit 95f0252
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/migrations/Version20161209095131.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@
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'");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@
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'");
}
}

0 comments on commit 95f0252

Please sign in to comment.