migrations/Version20251009130000.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.  * Migration to add image_file column to searchtemp table
  8.  */
  9. final class Version20251009130000 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return 'Add image_file column to searchtemp table for product images';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql("
  18.             ALTER TABLE searchtemp
  19.             ADD COLUMN image_file VARCHAR(255) DEFAULT NULL AFTER description
  20.         ");
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         $this->addSql('ALTER TABLE searchtemp DROP COLUMN image_file');
  25.     }
  26. }