<?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 Version20231124160459 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 reminder ADD orderid_id INT DEFAULT NULL, ADD prospect_id INT DEFAULT NULL, ADD vestiging_id INT DEFAULT NULL, CHANGE datum datum DATE NOT NULL');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F406F90D45B FOREIGN KEY (orderid_id) REFERENCES `order` (id)');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40D182060A FOREIGN KEY (prospect_id) REFERENCES `prospect` (id)');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F4096ADF99E FOREIGN KEY (vestiging_id) REFERENCES vestiging (id)');
$this->addSql('CREATE INDEX IDX_40374F406F90D45B ON reminder (orderid_id)');
$this->addSql('CREATE INDEX IDX_40374F40D182060A ON reminder (prospect_id)');
$this->addSql('CREATE INDEX IDX_40374F4096ADF99E ON reminder (vestiging_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F406F90D45B');
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40D182060A');
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F4096ADF99E');
$this->addSql('DROP INDEX IDX_40374F406F90D45B ON reminder');
$this->addSql('DROP INDEX IDX_40374F40D182060A ON reminder');
$this->addSql('DROP INDEX IDX_40374F4096ADF99E ON reminder');
$this->addSql('ALTER TABLE reminder DROP orderid_id, DROP prospect_id, DROP vestiging_id, CHANGE datum datum DATE DEFAULT NULL');
}
}