<?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 Version20230717085040 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 sponsor DROP ordre');
        $this->addSql('ALTER TABLE user_reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');
        $this->addSql('DROP INDEX idx_7ce748aa76ed395 ON user_reset_password_request');
        $this->addSql('CREATE INDEX IDX_B0B32CFCA76ED395 ON user_reset_password_request (user_id)');
        $this->addSql('ALTER TABLE user_reset_password_request ADD CONSTRAINT FK_7CE748AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE sponsor ADD ordre INT NOT NULL');
        $this->addSql('ALTER TABLE user_reset_password_request DROP FOREIGN KEY FK_B0B32CFCA76ED395');
        $this->addSql('DROP INDEX idx_b0b32cfca76ed395 ON user_reset_password_request');
        $this->addSql('CREATE INDEX IDX_7CE748AA76ED395 ON user_reset_password_request (user_id)');
        $this->addSql('ALTER TABLE user_reset_password_request ADD CONSTRAINT FK_B0B32CFCA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
    }
}
