mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[Migrations] Remove Scope model in migrations
This commit is contained in:
parent
e3b30d0f49
commit
fc9c9ffe40
2 changed files with 6 additions and 8 deletions
|
|
@ -14,18 +14,17 @@ declare(strict_types=1);
|
|||
namespace Sylius\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
use Sylius\Component\Addressing\Model\Scope;
|
||||
use Sylius\Bundle\CoreBundle\Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
class Version20161209095131 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql(sprintf("UPDATE sylius_zone SET scope = '%s' where scope IS NULL", Scope::ALL));
|
||||
$this->addSql("UPDATE sylius_zone SET scope = 'all' WHERE scope IS NULL");
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql(sprintf("UPDATE sylius_zone SET scope = NULL where scope = '%s'", Scope::ALL));
|
||||
$this->addSql("UPDATE sylius_zone SET scope = NULL WHERE scope = 'all'");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,18 +14,17 @@ declare(strict_types=1);
|
|||
namespace Sylius\Bundle\CoreBundle\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
use Sylius\Component\Addressing\Model\Scope;
|
||||
use Sylius\Bundle\CoreBundle\Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
class Version20161209095131 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql(sprintf("UPDATE sylius_zone SET scope = '%s' where scope IS NULL", Scope::ALL));
|
||||
$this->addSql("UPDATE sylius_zone SET scope = 'all' WHERE scope IS NULL");
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql(sprintf("UPDATE sylius_zone SET scope = NULL where scope = '%s'", Scope::ALL));
|
||||
$this->addSql("UPDATE sylius_zone SET scope = NULL WHERE scope = 'all'");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue