migrations/Version20240807083418.php line 1

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace DoctrineMigrations;
  3. use Doctrine\DBAL\Schema\Schema;
  4. use Doctrine\Migrations\AbstractMigration;
  5. final class Version20240807083418 extends AbstractMigration
  6. {
  7.     public function getDescription(): string
  8.     {
  9.         return 'Adds a feature flag to activate/deactivate SMS status check and automatic confirmation.';
  10.     }
  11.     public function up(Schema $schema): void
  12.     {
  13.         $this->addSql('ALTER TABLE processor_credentials ADD sms_status_check TINYINT(1) DEFAULT 1');
  14.         $this->addSql('ALTER TABLE sms_intents ADD validated_by VARCHAR(16) NOT NULL, CHANGE sms_price sms_price NUMERIC(8, 3) DEFAULT \'0\' NOT NULL');
  15.     }
  16.     public function down(Schema $schema): void
  17.     {
  18.         $this->addSql('ALTER TABLE processor_credentials DROP sms_status_check');
  19.         $this->addSql('ALTER TABLE sms_intents DROP validated_by, CHANGE sms_price sms_price NUMERIC(8, 3) DEFAULT \'0.000\' NOT NULL');
  20.     }
  21. }