migrations/Version20221204192128.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 Version20221204192128 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 news ADD short_content LONGTEXT NOT NULL");
  19.     $this->addSql(
  20.       "ALTER TABLE news_translation ADD short_content LONGTEXT NOT NULL"
  21.     );
  22.     $this->addSql(
  23.       "ALTER TABLE news CHANGE short_content short_content LONGTEXT DEFAULT NULL"
  24.     );
  25.     $this->addSql(
  26.       "ALTER TABLE news_translation CHANGE short_content short_content LONGTEXT DEFAULT NULL"
  27.     );
  28.   }
  29.   public function down(Schema $schema): void
  30.   {
  31.     // this down() migration is auto-generated, please modify it to your needs
  32.     $this->addSql("ALTER TABLE news DROP short_content");
  33.     $this->addSql("ALTER TABLE news_translation DROP short_content");
  34.   }
  35. }