migrations/Version20200710104624.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Application\Migrations;
  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 Version20200710104624 extends AbstractMigration
  10. {
  11.     public function up(Schema $schema): void
  12.     {
  13.         $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
  14.         $this->addSql('ALTER TABLE legal_entity_active_definition ADD uses_advised_against TINYINT(1) DEFAULT NULL');
  15.         $this->addSql('ALTER TABLE system_settings ADD uses_advised_against_name VARCHAR(255) DEFAULT NULL, ADD uses_advised_against_path VARCHAR(255) DEFAULT NULL, ADD uses_advised_against_mime_type VARCHAR(255) DEFAULT NULL, ADD uses_advised_against_size INT DEFAULT NULL, ADD uses_advised_against_timestamp DATETIME DEFAULT NULL COMMENT \'(DC2Type:carbondatetime)\'');
  16.     }
  17.     public function down(Schema $schema): void
  18.     {
  19.         $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
  20.         $this->addSql('ALTER TABLE legal_entity_active_definition DROP uses_advised_against');
  21.         $this->addSql('ALTER TABLE system_settings DROP uses_advised_against_name, DROP uses_advised_against_path, DROP uses_advised_against_mime_type, DROP uses_advised_against_size, DROP uses_advised_against_timestamp');
  22.     }
  23. }