migrations/Version20230521090905.php line 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 Version20230521090905 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 inventory_equipment ADD school_of_magic_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE inventory_equipment ADD CONSTRAINT FK_54843CEBDDD08718 FOREIGN KEY (school_of_magic_id) REFERENCES school_of_magic (id)');
$this->addSql('CREATE INDEX IDX_54843CEBDDD08718 ON inventory_equipment (school_of_magic_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE inventory_equipment DROP FOREIGN KEY FK_54843CEBDDD08718');
$this->addSql('DROP INDEX IDX_54843CEBDDD08718 ON inventory_equipment');
$this->addSql('ALTER TABLE inventory_equipment DROP school_of_magic_id');
}
}