migrations/Version20211109135500.php line 1

Open in your IDE?
  1. <?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 Version20211109135500 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 vehicule ADD statut_id INT NOT NULL');
            $this->addSql('ALTER TABLE vehicule ADD CONSTRAINT FK_292FFF1DF6203804 FOREIGN KEY (statut_id) REFERENCES statut (id)');
            $this->addSql('CREATE INDEX IDX_292FFF1DF6203804 ON vehicule (statut_id)');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE vehicule DROP FOREIGN KEY FK_292FFF1DF6203804');
            $this->addSql('DROP INDEX IDX_292FFF1DF6203804 ON vehicule');
            $this->addSql('ALTER TABLE vehicule DROP statut_id');
        }
    }