Spaces:
No application file
No application file
File size: 1,116 Bytes
d2897cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<?php
declare(strict_types=1);
namespace Mautic\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Mautic\CoreBundle\Doctrine\AbstractMauticMigration;
final class Version20230307083702 extends AbstractMauticMigration
{
public function up(Schema $schema): void
{
$old = $this->connection->quote('Swaziland');
$new = $this->connection->quote('Eswatini');
$this->addSql("UPDATE `{$this->prefix}leads` SET `country` = {$new} WHERE `country` = {$old}");
$this->addSql("UPDATE `{$this->prefix}companies` SET `companycountry` = {$new} WHERE `companycountry` = {$old}");
$old = $this->connection->quote('s:6:"filter";s:9:"Swaziland";');
$new = $this->connection->quote('s:6:"filter";s:8:"Eswatini";');
$this->addSql("UPDATE `{$this->prefix}dynamic_content` SET `filters` = REPLACE(`filters`, {$old}, {$new})");
$this->addSql("UPDATE `{$this->prefix}lead_lists` SET `filters` = REPLACE(`filters`, {$old}, {$new})");
$this->addSql("UPDATE `{$this->prefix}emails` SET `dynamic_content` = REPLACE(`dynamic_content`, {$old}, {$new})");
}
}
|