migrations/Version20230627105043.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 Version20230627105043 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return '';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         $this->addSql('CREATE TABLE `list_mobile_app_versions` (id INT AUTO_INCREMENT NOT NULL, operating_system VARCHAR(255) NOT NULL, external_code VARCHAR(255) DEFAULT NULL, version VARCHAR(50) NOT NULL, is_mandatory_update TINYINT(1) DEFAULT 0 NOT NULL, description LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_58D8A881E20A50B4 (external_code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  15.         $this->addSql('INSERT INTO `list_mobile_app_versions` (`operating_system`, `version`, `is_mandatory_update`, `created_at`, `updated_at`) VALUES (\'Android\', \'13\', false, \''.(new \DateTimeImmutable())->format('Y-m-d H:i:s').'\', \''.(new \DateTimeImmutable())->format('Y-m-d H:i:s').'\')');
  16.         $this->addSql('INSERT INTO `list_mobile_app_versions` (`operating_system`, `version`, `is_mandatory_update`, `created_at`, `updated_at`) VALUES (\'iOS\', \'16.5.1\', false, \''.(new \DateTimeImmutable())->format('Y-m-d H:i:s').'\', \''.(new \DateTimeImmutable())->format('Y-m-d H:i:s').'\')');
  17.     }
  18.     public function down(Schema $schema): void
  19.     {
  20.         $this->addSql('DROP TABLE `list_mobile_app_versions`');
  21.     }
  22. }