migrations/Version20220523135719.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. /**
  6.  * Auto-generated Migration: Please modify to your needs!
  7.  */
  8. final class Version20220523135719 extends AbstractMigration
  9. {
  10.     public function getDescription(): string
  11.     {
  12.         return '';
  13.     }
  14.     public function up(Schema $schema): void
  15.     {
  16.         // this up() migration is auto-generated, please modify it to your needs
  17.         $this->addSql('CREATE UNIQUE INDEX UNIQ_FBD8E0F8989D9B62 ON job (slug)');
  18.         $this->addSql('ALTER TABLE location ADD address VARCHAR(255) DEFAULT NULL');
  19.         $this->addSql('ALTER TABLE news ADD cover_image_path VARCHAR(255) DEFAULT NULL, ADD slug VARCHAR(255) NOT NULL');
  20.         $this->addSql('CREATE UNIQUE INDEX UNIQ_1DD39950989D9B62 ON news (slug)');
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         // this down() migration is auto-generated, please modify it to your needs
  25.         $this->addSql('DROP INDEX UNIQ_FBD8E0F8989D9B62 ON job');
  26.         $this->addSql('ALTER TABLE location DROP address');
  27.         $this->addSql('DROP INDEX UNIQ_1DD39950989D9B62 ON news');
  28.         $this->addSql('ALTER TABLE news DROP cover_image_path, DROP slug');
  29.     }
  30. }