src/Migrations/Version20210717160342.php line 1

  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20210717160342 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE olymp_online_category ADD participant_types JSON DEFAULT NULL');
  19.         $this->addSql('ALTER TABLE olymp_online_direction DROP interval_from, DROP interval_to, DROP apply_button, DROP apply_description, DROP ti_from, DROP ti_to, DROP ro_from, DROP ro_to');
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.         // this down() migration is auto-generated, please modify it to your needs
  24.         $this->addSql('ALTER TABLE olymp_online_category DROP participant_types');
  25.         $this->addSql('ALTER TABLE olymp_online_direction ADD interval_from DATE DEFAULT NULL, ADD interval_to DATE DEFAULT NULL, ADD apply_button VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD apply_description LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD ti_from TIME DEFAULT NULL, ADD ti_to TIME DEFAULT NULL, ADD ro_from DATETIME DEFAULT NULL, ADD ro_to DATETIME DEFAULT NULL');
  26.     }
  27. }