migrations/Version20230517070231.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 Version20230517070231 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('ALTER TABLE sample DROP FOREIGN KEY FK_F10B76C3AEB32CA2');
  18.         $this->addSql('DROP INDEX UNIQ_F10B76C3AEB32CA2 ON sample');
  19.         $this->addSql('ALTER TABLE sample DROP FOREIGN KEY FK_F10B76C32C944544');
  20.         $this->addSql('DROP INDEX UNIQ_F10B76C32C944544 ON sample');
  21.         $this->addSql('ALTER TABLE sample ADD CONSTRAINT FK_F10B76C3AEB32CA2 FOREIGN KEY (inbound_address_id) REFERENCES address (id)');
  22.         $this->addSql('ALTER TABLE sample ADD CONSTRAINT FK_F10B76C32C944544 FOREIGN KEY (outbound_address_id) REFERENCES address (id)');
  23.         $this->addSql('ALTER TABLE invoice DROP FOREIGN KEY FK_9065174471A12A28');
  24.         $this->addSql('ALTER TABLE invoice DROP FOREIGN KEY FK_90651744EBF23851');
  25.         $this->addSql('DROP INDEX UNIQ_9065174471A12A28 ON invoice');
  26.         $this->addSql('DROP INDEX UNIQ_90651744EBF23851 ON invoice');
  27.         $this->addSql('ALTER TABLE invoice ADD CONSTRAINT FK_9065174471A12A28 FOREIGN KEY (sender_address_id) REFERENCES address (id)');
  28.         $this->addSql('ALTER TABLE invoice ADD CONSTRAINT FK_90651744EBF23851 FOREIGN KEY (delivery_address_id) REFERENCES address (id)');
  29.     }
  30.     public function down(Schema $schema): void
  31.     {}
  32. }