Add PostGreSQL migration

This commit is contained in:
Francis Hilaire 2024-10-24 23:13:21 +02:00
parent ab5e11450d
commit 9abf49e1b5
No known key found for this signature in database
GPG key ID: 3392F830BF33D421

View file

@ -0,0 +1,35 @@
<?php
/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Bundle\CoreBundle\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Sylius\Bundle\CoreBundle\Doctrine\Migrations\AbstractPostgreSQLMigration;
final class Version20241024174729 extends AbstractPostgreSQLMigration
{
public function getDescription(): string
{
return 'Add a way to distinguish PaymentRequest gateway from Payum one.';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE sylius_gateway_config ADD use_payum BOOLEAN DEFAULT false NOT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE sylius_gateway_config DROP use_payum');
}
}