<?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 Version20241112110506 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE charge ADD agent_id INT NOT NULL, DROP agent');
$this->addSql('ALTER TABLE charge ADD CONSTRAINT FK_556BA4343414710B FOREIGN KEY (agent_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_556BA4343414710B ON charge (agent_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE charge DROP FOREIGN KEY FK_556BA4343414710B');
$this->addSql('DROP INDEX IDX_556BA4343414710B ON charge');
$this->addSql('ALTER TABLE charge ADD agent VARCHAR(255) NOT NULL, DROP agent_id');
}
}