migrations/Version20220406005709.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20220406005709 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE activity DROP FOREIGN KEY FK_AC74095A61220EA6');
  19.         $this->addSql('ALTER TABLE activity ADD CONSTRAINT FK_AC74095A61220EA6 FOREIGN KEY (creator_id) REFERENCES creator (id) ON DELETE CASCADE');
  20.         $this->addSql('ALTER TABLE payment_account DROP FOREIGN KEY FK_647F584EBF396750');
  21.         $this->addSql('ALTER TABLE payment_account ADD CONSTRAINT FK_647F584EBF396750 FOREIGN KEY (id) REFERENCES user (id) ON DELETE CASCADE');
  22.         $this->addSql('ALTER TABLE payment_balance DROP FOREIGN KEY FK_B5BD1114BF396750');
  23.         $this->addSql('ALTER TABLE payment_balance ADD CONSTRAINT FK_B5BD1114BF396750 FOREIGN KEY (id) REFERENCES user (id) ON DELETE CASCADE');
  24.         $this->addSql('ALTER TABLE payment_history DROP FOREIGN KEY FK_3EF37EA1A76ED395');
  25.         $this->addSql('ALTER TABLE payment_history ADD CONSTRAINT FK_3EF37EA1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
  26.     }
  27.     public function down(Schema $schema): void
  28.     {
  29.         // this down() migration is auto-generated, please modify it to your needs
  30.         $this->addSql('ALTER TABLE activity DROP FOREIGN KEY FK_AC74095A61220EA6');
  31.         $this->addSql('ALTER TABLE activity ADD CONSTRAINT FK_AC74095A61220EA6 FOREIGN KEY (creator_id) REFERENCES creator (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
  32.         $this->addSql('ALTER TABLE payment_account DROP FOREIGN KEY FK_647F584EBF396750');
  33.         $this->addSql('ALTER TABLE payment_account ADD CONSTRAINT FK_647F584EBF396750 FOREIGN KEY (id) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
  34.         $this->addSql('ALTER TABLE payment_balance DROP FOREIGN KEY FK_B5BD1114BF396750');
  35.         $this->addSql('ALTER TABLE payment_balance ADD CONSTRAINT FK_B5BD1114BF396750 FOREIGN KEY (id) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
  36.         $this->addSql('ALTER TABLE payment_history DROP FOREIGN KEY FK_3EF37EA1A76ED395');
  37.         $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');
  38.     }
  39.     public function isTransactional(): bool
  40.     {
  41.         return false;
  42.     }
  43. }