Deprecated: Constant E_STRICT is deprecated in /data/web/apps/test2-bridge.kwalitaria.bluebirdday.io/releases/1/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /data/web/apps/test2-bridge.kwalitaria.bluebirdday.io/releases/1/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

migrations/Version20220201102820.php line 1

  1. <?php
    
    declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    use Doctrine\Migrations\AbstractMigration;
    
    /**
     * Auto-generated Migration: Please modify to your needs!
     */
    final class Version20220201102820 extends AbstractMigration
    {
        public function getDescription(): string
        {
            return 'Add store payment unique index';
        }
    
        public function up(Schema $schema): void
        {
            // Custom, prevent unique errors.
            $this->addSql("DELETE FROM store_payment_method WHERE id != ''");
    
            // this up() migration is auto-generated, please modify it to your needs
            $this->addSql('CREATE UNIQUE INDEX store_delivery_code ON store_payment_method (delivery_method_id, code)');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('DROP INDEX store_delivery_code ON store_payment_method');
        }
    
        public function isTransactional(): bool
        {
            return false;
        }
    }