<?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 Version20220703134031 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('DROP TABLE subtheme');
$this->addSql('ALTER TABLE activity DROP price, CHANGE date_end date_end DATETIME DEFAULT NULL, CHANGE date_register_start date_register_start DATETIME DEFAULT NULL, CHANGE date_register_end date_register_end DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE school_activity ADD normal_price NUMERIC(5, 2) NOT NULL, ADD jette_price NUMERIC(5, 2) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE subtheme (subtheme_theme_id INT NOT NULL, theme_id INT NOT NULL, INDEX IDX_EDC608D29BC1E100 (subtheme_theme_id), INDEX IDX_EDC608D259027487 (theme_id), PRIMARY KEY(theme_id, subtheme_theme_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE subtheme ADD CONSTRAINT FK_EDC608D29BC1E100 FOREIGN KEY (subtheme_theme_id) REFERENCES theme (id)');
$this->addSql('ALTER TABLE subtheme ADD CONSTRAINT FK_EDC608D259027487 FOREIGN KEY (theme_id) REFERENCES theme (id)');
$this->addSql('ALTER TABLE activity ADD price NUMERIC(5, 2) NOT NULL, CHANGE date_end date_end DATETIME NOT NULL, CHANGE date_register_start date_register_start DATETIME NOT NULL, CHANGE date_register_end date_register_end DATETIME NOT NULL');
$this->addSql('ALTER TABLE school_activity DROP normal_price, DROP jette_price');
}
}