<?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 Version20231220152058 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 customer_password_link DROP FOREIGN KEY FK_C09CEEB94A3353D8');
$this->addSql('DROP INDEX IDX_C09CEEB94A3353D8 ON customer_password_link');
$this->addSql('ALTER TABLE customer_password_link CHANGE app_user_id customer_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE customer_password_link ADD CONSTRAINT FK_C09CEEB99395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id) ON DELETE CASCADE');
$this->addSql('CREATE INDEX IDX_C09CEEB99395C3F3 ON customer_password_link (customer_id)');
$this->addSql('ALTER TABLE user_password_link DROP FOREIGN KEY FK_4A7733EA4A3353D8');
$this->addSql('DROP INDEX IDX_4A7733EA4A3353D8 ON user_password_link');
$this->addSql('ALTER TABLE user_password_link CHANGE app_user_id user_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE user_password_link ADD CONSTRAINT FK_4A7733EAA76ED395 FOREIGN KEY (user_id) REFERENCES mc_admin (id) ON DELETE CASCADE');
$this->addSql('CREATE INDEX IDX_4A7733EAA76ED395 ON user_password_link (user_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE customer_password_link DROP FOREIGN KEY FK_C09CEEB99395C3F3');
$this->addSql('DROP INDEX IDX_C09CEEB99395C3F3 ON customer_password_link');
$this->addSql('ALTER TABLE customer_password_link CHANGE customer_id app_user_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE customer_password_link ADD CONSTRAINT FK_C09CEEB94A3353D8 FOREIGN KEY (app_user_id) REFERENCES customer (id)');
$this->addSql('CREATE INDEX IDX_C09CEEB94A3353D8 ON customer_password_link (app_user_id)');
$this->addSql('ALTER TABLE user_password_link DROP FOREIGN KEY FK_4A7733EAA76ED395');
$this->addSql('DROP INDEX IDX_4A7733EAA76ED395 ON user_password_link');
$this->addSql('ALTER TABLE user_password_link CHANGE user_id app_user_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE user_password_link ADD CONSTRAINT FK_4A7733EA4A3353D8 FOREIGN KEY (app_user_id) REFERENCES mc_admin (id)');
$this->addSql('CREATE INDEX IDX_4A7733EA4A3353D8 ON user_password_link (app_user_id)');
}
}