<?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 Version20230321182744 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 chat DROP FOREIGN KEY FK_659DF2AA22BA975D');
$this->addSql('ALTER TABLE chat DROP FOREIGN KEY FK_659DF2AA49E67092');
$this->addSql('ALTER TABLE chat ADD CONSTRAINT FK_659DF2AA22BA975D FOREIGN KEY (participant_two_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE chat ADD CONSTRAINT FK_659DF2AA49E67092 FOREIGN KEY (participant_one_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE child DROP FOREIGN KEY FK_22B35429A76ED395');
$this->addSql('ALTER TABLE child ADD CONSTRAINT FK_22B35429A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE post DROP FOREIGN KEY FK_5A8A6C8DCCFA12B8');
$this->addSql('ALTER TABLE post ADD CONSTRAINT FK_5A8A6C8DCCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE post_comment DROP FOREIGN KEY FK_A99CE55F4B89032C');
$this->addSql('ALTER TABLE post_comment DROP FOREIGN KEY FK_A99CE55FCCFA12B8');
$this->addSql('ALTER TABLE post_comment DROP FOREIGN KEY FK_A99CE55F727ACA70');
$this->addSql('ALTER TABLE post_comment ADD CONSTRAINT FK_A99CE55F4B89032C FOREIGN KEY (post_id) REFERENCES post (id)');
$this->addSql('ALTER TABLE post_comment ADD CONSTRAINT FK_A99CE55FCCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE post_comment ADD CONSTRAINT FK_A99CE55F727ACA70 FOREIGN KEY (parent_id) REFERENCES post_comment (id)');
$this->addSql('ALTER TABLE post_comment_media DROP FOREIGN KEY FK_DCC787EEDB1174D2');
$this->addSql('ALTER TABLE post_comment_media ADD CONSTRAINT FK_DCC787EEDB1174D2 FOREIGN KEY (post_comment_id) REFERENCES post_comment (id)');
$this->addSql('ALTER TABLE post_media DROP FOREIGN KEY FK_FD372DE34B89032C');
$this->addSql('ALTER TABLE post_media ADD CONSTRAINT FK_FD372DE34B89032C FOREIGN KEY (post_id) REFERENCES post (id)');
$this->addSql('ALTER TABLE post_profile_reaction DROP FOREIGN KEY FK_1E99B9EC4B89032C');
$this->addSql('ALTER TABLE post_profile_reaction DROP FOREIGN KEY FK_1E99B9ECDB1174D2');
$this->addSql('ALTER TABLE post_profile_reaction DROP FOREIGN KEY FK_1E99B9EC6B9DD454');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9EC4B89032C FOREIGN KEY (post_id) REFERENCES post (id)');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9ECDB1174D2 FOREIGN KEY (post_comment_id) REFERENCES post_comment (id)');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9EC6B9DD454 FOREIGN KEY (user_profile_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE user_payment_methods DROP FOREIGN KEY FK_5D77950CA76ED395');
$this->addSql('ALTER TABLE user_payment_methods ADD CONSTRAINT FK_5D77950CA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_profile DROP FOREIGN KEY FK_D95AB405A76ED395');
$this->addSql('ALTER TABLE user_profile ADD CONSTRAINT FK_D95AB405A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_profile_interests DROP FOREIGN KEY FK_8C3457BACCFA12B8');
$this->addSql('ALTER TABLE user_profile_interests ADD CONSTRAINT FK_8C3457BACCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE user_profile_section DROP FOREIGN KEY FK_EC11C8FCCCFA12B8');
$this->addSql('ALTER TABLE user_profile_section ADD CONSTRAINT FK_EC11C8FCCCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE user_subscription DROP FOREIGN KEY FK_230A18D1A76ED395');
$this->addSql('ALTER TABLE user_subscription ADD CONSTRAINT FK_230A18D1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_subscription_especial DROP FOREIGN KEY FK_8B848379A76ED395');
$this->addSql('ALTER TABLE user_subscription_especial ADD CONSTRAINT FK_8B848379A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE chat DROP FOREIGN KEY FK_659DF2AA49E67092');
$this->addSql('ALTER TABLE chat DROP FOREIGN KEY FK_659DF2AA22BA975D');
$this->addSql('ALTER TABLE chat ADD CONSTRAINT FK_659DF2AA49E67092 FOREIGN KEY (participant_one_id) REFERENCES user_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE chat ADD CONSTRAINT FK_659DF2AA22BA975D FOREIGN KEY (participant_two_id) REFERENCES user_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE child DROP FOREIGN KEY FK_22B35429A76ED395');
$this->addSql('ALTER TABLE child ADD CONSTRAINT FK_22B35429A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post DROP FOREIGN KEY FK_5A8A6C8DCCFA12B8');
$this->addSql('ALTER TABLE post ADD CONSTRAINT FK_5A8A6C8DCCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_comment DROP FOREIGN KEY FK_A99CE55F4B89032C');
$this->addSql('ALTER TABLE post_comment DROP FOREIGN KEY FK_A99CE55FCCFA12B8');
$this->addSql('ALTER TABLE post_comment DROP FOREIGN KEY FK_A99CE55F727ACA70');
$this->addSql('ALTER TABLE post_comment ADD CONSTRAINT FK_A99CE55F4B89032C FOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_comment ADD CONSTRAINT FK_A99CE55FCCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_comment ADD CONSTRAINT FK_A99CE55F727ACA70 FOREIGN KEY (parent_id) REFERENCES post_comment (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_comment_media DROP FOREIGN KEY FK_DCC787EEDB1174D2');
$this->addSql('ALTER TABLE post_comment_media ADD CONSTRAINT FK_DCC787EEDB1174D2 FOREIGN KEY (post_comment_id) REFERENCES post_comment (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_media DROP FOREIGN KEY FK_FD372DE34B89032C');
$this->addSql('ALTER TABLE post_media ADD CONSTRAINT FK_FD372DE34B89032C FOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_profile_reaction DROP FOREIGN KEY FK_1E99B9EC4B89032C');
$this->addSql('ALTER TABLE post_profile_reaction DROP FOREIGN KEY FK_1E99B9EC6B9DD454');
$this->addSql('ALTER TABLE post_profile_reaction DROP FOREIGN KEY FK_1E99B9ECDB1174D2');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9EC4B89032C FOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9EC6B9DD454 FOREIGN KEY (user_profile_id) REFERENCES user_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9ECDB1174D2 FOREIGN KEY (post_comment_id) REFERENCES post_comment (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE user_payment_methods DROP FOREIGN KEY FK_5D77950CA76ED395');
$this->addSql('ALTER TABLE user_payment_methods ADD CONSTRAINT FK_5D77950CA76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE user_profile DROP FOREIGN KEY FK_D95AB405A76ED395');
$this->addSql('ALTER TABLE user_profile ADD CONSTRAINT FK_D95AB405A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE user_profile_interests DROP FOREIGN KEY FK_8C3457BACCFA12B8');
$this->addSql('ALTER TABLE user_profile_interests ADD CONSTRAINT FK_8C3457BACCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE user_profile_section DROP FOREIGN KEY FK_EC11C8FCCCFA12B8');
$this->addSql('ALTER TABLE user_profile_section ADD CONSTRAINT FK_EC11C8FCCCFA12B8 FOREIGN KEY (profile_id) REFERENCES user_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE user_subscription DROP FOREIGN KEY FK_230A18D1A76ED395');
$this->addSql('ALTER TABLE user_subscription ADD CONSTRAINT FK_230A18D1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE user_subscription_especial DROP FOREIGN KEY FK_8B848379A76ED395');
$this->addSql('ALTER TABLE user_subscription_especial ADD CONSTRAINT FK_8B848379A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
}
}