vendor/bluue/projects-bundle/migrations/Version20230830071702.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace ProjectsBundleMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. final class Version20230830071702 extends AbstractMigration
  7. {
  8.     public function up(Schema $schema): void
  9.     {
  10.         $this->addSql('ALTER TABLE projects_bundle__task_state ADD to_schedule TINYINT(1) NOT NULL, ADD scheduled TINYINT(1) NOT NULL');
  11.         $this->addSql('CREATE INDEX to_schedule ON projects_bundle__task_state (to_schedule)');
  12.         $this->addSql('CREATE INDEX scheduled ON projects_bundle__task_state (scheduled)');
  13.     }
  14.     public function down(Schema $schema): void
  15.     {
  16.         $this->addSql('DROP INDEX to_schedule ON projects_bundle__task_state');
  17.         $this->addSql('DROP INDEX scheduled ON projects_bundle__task_state');
  18.         $this->addSql('ALTER TABLE projects_bundle__task_state DROP to_schedule, DROP scheduled');
  19.     }
  20. }