<?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 Version20220406005709 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 activity DROP FOREIGN KEY FK_AC74095A61220EA6');
$this->addSql('ALTER TABLE activity ADD CONSTRAINT FK_AC74095A61220EA6 FOREIGN KEY (creator_id) REFERENCES creator (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE payment_account DROP FOREIGN KEY FK_647F584EBF396750');
$this->addSql('ALTER TABLE payment_account ADD CONSTRAINT FK_647F584EBF396750 FOREIGN KEY (id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE payment_balance DROP FOREIGN KEY FK_B5BD1114BF396750');
$this->addSql('ALTER TABLE payment_balance ADD CONSTRAINT FK_B5BD1114BF396750 FOREIGN KEY (id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE payment_history DROP FOREIGN KEY FK_3EF37EA1A76ED395');
$this->addSql('ALTER TABLE payment_history ADD CONSTRAINT FK_3EF37EA1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE activity DROP FOREIGN KEY FK_AC74095A61220EA6');
$this->addSql('ALTER TABLE activity ADD CONSTRAINT FK_AC74095A61220EA6 FOREIGN KEY (creator_id) REFERENCES creator (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE payment_account DROP FOREIGN KEY FK_647F584EBF396750');
$this->addSql('ALTER TABLE payment_account ADD CONSTRAINT FK_647F584EBF396750 FOREIGN KEY (id) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE payment_balance DROP FOREIGN KEY FK_B5BD1114BF396750');
$this->addSql('ALTER TABLE payment_balance ADD CONSTRAINT FK_B5BD1114BF396750 FOREIGN KEY (id) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE payment_history DROP FOREIGN KEY FK_3EF37EA1A76ED395');
$this->addSql('ALTER TABLE payment_history ADD CONSTRAINT FK_3EF37EA1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
}
public function isTransactional(): bool
{
return false;
}
}