<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20241106104235 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add a new field to insert domain referer in order/payment';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE `order` ADD domain_name VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE payment ADD domain_name VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE `order` DROP domain_name');
$this->addSql('ALTER TABLE payment DROP domain_name');
}
}