<?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 Version20200923203350 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 dvf ADD id INT NOT NULL');
$this->addSql('CREATE INDEX IDX_C1765B6398260155 ON departement (region_id)');
$this->addSql('ALTER TABLE dvf ALTER numero_disposition TYPE VARCHAR(255)');
$this->addSql('ALTER TABLE dvf ALTER numero_disposition DROP DEFAULT');
$this->addSql('ALTER TABLE dvf ALTER adresse_numero TYPE VARCHAR(255)');
$this->addSql('ALTER TABLE dvf ALTER adresse_numero DROP DEFAULT');
$this->addSql('ALTER TABLE dvf ADD PRIMARY KEY (id)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP INDEX "primary"');
$this->addSql('ALTER TABLE dvf DROP id');
$this->addSql('ALTER TABLE dvf ALTER numero_disposition TYPE INT');
$this->addSql('ALTER TABLE dvf ALTER numero_disposition DROP DEFAULT');
$this->addSql('ALTER TABLE dvf ALTER adresse_numero TYPE INT');
$this->addSql('ALTER TABLE dvf ALTER adresse_numero DROP DEFAULT');
}
}