<?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 Version20211130101742 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 cal_sparetime_activity_date ADD duration INT NOT NULL, ADD max_users INT NOT NULL, DROP is_recurrent, DROP date_from, DROP date_to');
$this->addSql('ALTER TABLE cal_sparetime_activity_registration ADD survey_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_sparetime_activity_registration ADD CONSTRAINT FK_7281DBBCB3FE509D FOREIGN KEY (survey_id) REFERENCES cal_survey (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_7281DBBCB3FE509D ON cal_sparetime_activity_registration (survey_id)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cal_sparetime_activity_date ADD is_recurrent TINYINT(1) DEFAULT NULL, ADD date_from DATETIME DEFAULT NULL, ADD date_to DATETIME DEFAULT NULL, DROP duration, DROP max_users');
$this->addSql('ALTER TABLE cal_sparetime_activity_registration DROP FOREIGN KEY FK_7281DBBCB3FE509D');
$this->addSql('DROP INDEX UNIQ_7281DBBCB3FE509D ON cal_sparetime_activity_registration');
$this->addSql('ALTER TABLE cal_sparetime_activity_registration DROP survey_id');
}
}