migrations/Version20260619120000.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. final class Version20260619120000 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'Campaign mechanics: add campaign.deadline_extension_count so an under-spent campaign '
  11.             'past its deadline is auto-extended (kept open to keep filling until the budget is met) '
  12.             'up to a capped number of times, instead of completing under budget at the deadline.';
  13.     }
  14.     public function up(Schema $schema): void
  15.     {
  16.         $this->addSql('ALTER TABLE campaign ADD deadline_extension_count INT UNSIGNED DEFAULT 0 NOT NULL');
  17.     }
  18.     public function down(Schema $schema): void
  19.     {
  20.         $this->addSql('ALTER TABLE campaign DROP deadline_extension_count');
  21.     }
  22. }