migrations/Version20230913212932.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 Version20230913212932 extends AbstractMigration
  7. {
  8.     public function up(Schema $schema): void
  9.     {
  10.         $this->addSql('ALTER TABLE lot ADD name_generated TINYINT(1) DEFAULT NULL');
  11.         $this->addSql('ALTER TABLE lot ADD description_generated TINYINT(1) DEFAULT NULL');
  12.         $this->addSql('UPDATE lot SET name_generated = 0');
  13.         $this->addSql('UPDATE lot SET description_generated = 0');
  14.     }
  15.     public function down(Schema $schema): void
  16.     {
  17.         $this->addSql('ALTER TABLE lot DROP description_generated');
  18.     }
  19. }