migrations/Version20221208145023.php line 1

Open in your IDE?
  1. <?php
    
    declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    use Doctrine\Migrations\AbstractMigration;
    
    /**
     * Auto-generated Migration: Please modify to your needs!
     */
    final class Version20221208145023 extends AbstractMigration
    {
        public function getDescription(): string
        {
            return '';
        }
    
        public function up(Schema $schema): void
        {
            // this up() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE survey DROP FOREIGN KEY FK_AD5F9BFC50266CBB');
            $this->addSql('DROP INDEX IDX_AD5F9BFC50266CBB ON survey');
            $this->addSql('ALTER TABLE survey ADD face_shape VARCHAR(255) DEFAULT NULL, DROP shape_id');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE `survey` ADD shape_id INT DEFAULT NULL, DROP face_shape');
            $this->addSql('ALTER TABLE `survey` ADD CONSTRAINT FK_AD5F9BFC50266CBB FOREIGN KEY (shape_id) REFERENCES shape (id)');
            $this->addSql('CREATE INDEX IDX_AD5F9BFC50266CBB ON `survey` (shape_id)');
        }
    }