-
Jonas Leder authoredJonas Leder authored
Version20221125110603.php 1.11 KiB
<?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 Version20221125110603 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 history ADD device_id INT NOT NULL');
$this->addSql('ALTER TABLE history ADD CONSTRAINT FK_27BA704B94A4C7D4 FOREIGN KEY (device_id) REFERENCES web_resetter (id)');
$this->addSql('CREATE INDEX IDX_27BA704B94A4C7D4 ON history (device_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE history DROP FOREIGN KEY FK_27BA704B94A4C7D4');
$this->addSql('DROP INDEX IDX_27BA704B94A4C7D4 ON history');
$this->addSql('ALTER TABLE history DROP device_id');
}
}