migrations/Version20230102130922.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 Version20230102130922 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 frame ADD nose_type_id INT DEFAULT NULL');
            $this->addSql('ALTER TABLE frame ADD CONSTRAINT FK_B5F83CCDA6365370 FOREIGN KEY (nose_type_id) REFERENCES nose_type (id)');
            $this->addSql('CREATE INDEX IDX_B5F83CCDA6365370 ON frame (nose_type_id)');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE frame DROP FOREIGN KEY FK_B5F83CCDA6365370');
            $this->addSql('DROP INDEX IDX_B5F83CCDA6365370 ON frame');
            $this->addSql('ALTER TABLE frame DROP nose_type_id');
        }
    }