<?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 Version20210726130151 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 symfony_demo_user ADD type_sav_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE symfony_demo_user ADD CONSTRAINT FK_8FB094A16CA5086B FOREIGN KEY (type_sav_id) REFERENCES type_sav (id)');
        $this->addSql('CREATE INDEX IDX_8FB094A16CA5086B ON symfony_demo_user (type_sav_id)');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE symfony_demo_user DROP FOREIGN KEY FK_8FB094A16CA5086B');
        $this->addSql('DROP INDEX IDX_8FB094A16CA5086B ON symfony_demo_user');
        $this->addSql('ALTER TABLE symfony_demo_user DROP type_sav_id');
    }
}
