<?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 Version20221014165034 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 entete_devis ADD site_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE entete_devis ADD CONSTRAINT FK_6199F57CF6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)');
$this->addSql('CREATE INDEX IDX_6199F57CF6BD1646 ON entete_devis (site_id)');
$this->addSql('ALTER TABLE entete_facture ADD site_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE entete_facture ADD CONSTRAINT FK_2DA57591F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)');
$this->addSql('CREATE INDEX IDX_2DA57591F6BD1646 ON entete_facture (site_id)');
$this->addSql('ALTER TABLE reglement_entreprise ADD site_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE reglement_entreprise ADD CONSTRAINT FK_9C1D0D7FF6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)');
$this->addSql('CREATE INDEX IDX_9C1D0D7FF6BD1646 ON reglement_entreprise (site_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE entete_devis DROP FOREIGN KEY FK_6199F57CF6BD1646');
$this->addSql('DROP INDEX IDX_6199F57CF6BD1646 ON entete_devis');
$this->addSql('ALTER TABLE entete_devis DROP site_id');
$this->addSql('ALTER TABLE entete_facture DROP FOREIGN KEY FK_2DA57591F6BD1646');
$this->addSql('DROP INDEX IDX_2DA57591F6BD1646 ON entete_facture');
$this->addSql('ALTER TABLE entete_facture DROP site_id');
$this->addSql('ALTER TABLE reglement_entreprise DROP FOREIGN KEY FK_9C1D0D7FF6BD1646');
$this->addSql('DROP INDEX IDX_9C1D0D7FF6BD1646 ON reglement_entreprise');
$this->addSql('ALTER TABLE reglement_entreprise DROP site_id');
}
}