<?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 Version20230210111912 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 respondent DROP FOREIGN KEY FK_409B5150190A1B68');
$this->addSql('ALTER TABLE respondent DROP FOREIGN KEY FK_409B51509F2C3FAB');
$this->addSql('DROP INDEX IDX_409B5150190A1B68 ON respondent');
$this->addSql('DROP INDEX IDX_409B51509F2C3FAB ON respondent');
$this->addSql('ALTER TABLE respondent DROP corps_id, DROP zone_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE respondent ADD corps_id INT NOT NULL, ADD zone_id INT NOT NULL');
$this->addSql('ALTER TABLE respondent ADD CONSTRAINT FK_409B5150190A1B68 FOREIGN KEY (corps_id) REFERENCES corps (id)');
$this->addSql('ALTER TABLE respondent ADD CONSTRAINT FK_409B51509F2C3FAB FOREIGN KEY (zone_id) REFERENCES zone (id)');
$this->addSql('CREATE INDEX IDX_409B5150190A1B68 ON respondent (corps_id)');
$this->addSql('CREATE INDEX IDX_409B51509F2C3FAB ON respondent (zone_id)');
}
}