<?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 Version20220823100848 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 entry DROP FOREIGN KEY FK_2B219D704BD2A4C0');
$this->addSql('ALTER TABLE entry DROP date');
$this->addSql('DROP INDEX fk_2b219d704bd2a4c0 ON entry');
$this->addSql('CREATE INDEX IDX_2B219D704BD2A4C0 ON entry (report_id)');
$this->addSql('ALTER TABLE entry ADD CONSTRAINT FK_2B219D704BD2A4C0 FOREIGN KEY (report_id) REFERENCES report (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE entry DROP FOREIGN KEY FK_2B219D704BD2A4C0');
$this->addSql('ALTER TABLE entry ADD date BIGINT NOT NULL');
$this->addSql('DROP INDEX idx_2b219d704bd2a4c0 ON entry');
$this->addSql('CREATE INDEX FK_2B219D704BD2A4C0 ON entry (report_id)');
$this->addSql('ALTER TABLE entry ADD CONSTRAINT FK_2B219D704BD2A4C0 FOREIGN KEY (report_id) REFERENCES report (id)');
}
}