<?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 Version20220124143243 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 mobilier ADD categorie_id INT NOT NULL');
$this->addSql('ALTER TABLE mobilier ADD CONSTRAINT FK_125BDA84BCF5E72D FOREIGN KEY (categorie_id) REFERENCES mobilier_categories (id)');
$this->addSql('CREATE INDEX IDX_125BDA84BCF5E72D ON mobilier (categorie_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE mobilier DROP FOREIGN KEY FK_125BDA84BCF5E72D');
$this->addSql('DROP INDEX IDX_125BDA84BCF5E72D ON mobilier');
$this->addSql('ALTER TABLE mobilier DROP categorie_id');
}
}