migrations/Version20230822114245.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. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20230822114245 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE region ADD banner_show TINYINT(1) DEFAULT 1 NOT NULL COMMENT \'Mostrar banner? 1: Sí, 0:No\', ADD banner_video_show TINYINT(1) DEFAULT 0 NOT NULL COMMENT \'Mostrar video como banner? 1: Sí, 0:No\', ADD banner_video_url VARCHAR(255) DEFAULT NULL COMMENT \'Url de video de banner\', ADD banner_video_title VARCHAR(155) DEFAULT NULL COMMENT \'Título del video del banner\', ADD banner_video_img VARCHAR(155) DEFAULT NULL COMMENT \'Imagen de video de banner\', ADD banner_video_text VARCHAR(155) DEFAULT NULL COMMENT \'Texto de video de banner\', ADD banner_video_btn_show TINYINT(1) DEFAULT 0 NOT NULL COMMENT \'Mostrar botón en el banner de video? 1: Sí, 0:No\', ADD banner_video_btn_text VARCHAR(85) DEFAULT NULL COMMENT \'Texto de botón de banner de video\', ADD banner_video_btn_url VARCHAR(255) DEFAULT NULL COMMENT \'Url de botón de banner de video\', ADD banner_video_btn_blank TINYINT(1) DEFAULT 0 NOT NULL COMMENT \'Abrir botón de video de banner en ventana nueva? 1: Sí, 0:No\', ADD banner_items LONGTEXT DEFAULT NULL COMMENT \'Items de banner(DC2Type:array)\'');
  19.         $this->addSql('UPDATE region SET banner_items = \'a:0:{}\'');
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.         // this down() migration is auto-generated, please modify it to your needs
  24.         $this->addSql('ALTER TABLE region DROP banner_show, DROP banner_video_show, DROP banner_video_url, DROP banner_video_title, DROP banner_video_img, DROP banner_video_text, DROP banner_video_btn_show, DROP banner_video_btn_text, DROP banner_video_btn_url, DROP banner_video_btn_blank, DROP banner_items');
  25.     }
  26. }