<?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 Version20181220212723 extends AbstractMigration
{
    public function up(Schema $schema): void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('ALTER TABLE ls_doc ADD frameworktype_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE ls_doc ADD CONSTRAINT FK_9AE8CF1F3C4C17B2 FOREIGN KEY (frameworktype_id) REFERENCES ls_def_framework_type (id)');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('DROP INDEX IDX_9AE8CF1F3C4C17B2 ON ls_doc');
        $this->addSql('ALTER TABLE ls_doc DROP frameworktype_id');
    }
}

<?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 Version20181220212723 extends AbstractMigration
{
    public function up(Schema $schema): void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('ALTER TABLE ls_doc ADD frameworktype_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE ls_doc ADD CONSTRAINT FK_9AE8CF1F3C4C17B2 FOREIGN KEY (frameworktype_id) REFERENCES ls_def_framework_type (id)');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('ALTER TABLE ls_doc DROP frameworktype_id');
    }
}

Remove drop for index that wasnt created.
Remove drop for index that wasnt created.
