migrations/Version20221018153307.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 Version20221018153307 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 operation DROP FOREIGN KEY FK_1981A66D2ADD6D8C');
  19.         $this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66DA53A8AA');
  20.         $this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D59E5119C');
  21.         $this->addSql('DROP INDEX IDX_1981A66D2ADD6D8C ON operation');
  22.         $this->addSql('DROP INDEX IDX_1981A66DA53A8AA ON operation');
  23.         $this->addSql('DROP INDEX IDX_1981A66D59E5119C ON operation');
  24.         $this->addSql('ALTER TABLE operation ADD source_supplier_id INT DEFAULT NULL, ADD source_provider_id INT DEFAULT NULL, ADD source_slot_id INT DEFAULT NULL, DROP supplier_id, DROP provider_id, DROP slot_id');
  25.         $this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D16A23D2C FOREIGN KEY (source_supplier_id) REFERENCES supplier (id)');
  26.         $this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D362CF80A FOREIGN KEY (source_provider_id) REFERENCES provider (id)');
  27.         $this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D103AA9F4 FOREIGN KEY (source_slot_id) REFERENCES slot (id)');
  28.         $this->addSql('CREATE INDEX IDX_1981A66D16A23D2C ON operation (source_supplier_id)');
  29.         $this->addSql('CREATE INDEX IDX_1981A66D362CF80A ON operation (source_provider_id)');
  30.         $this->addSql('CREATE INDEX IDX_1981A66D103AA9F4 ON operation (source_slot_id)');
  31.     }
  32.     public function down(Schema $schema): void
  33.     {
  34.         // this down() migration is auto-generated, please modify it to your needs
  35.         $this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D16A23D2C');
  36.         $this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D362CF80A');
  37.         $this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D103AA9F4');
  38.         $this->addSql('DROP INDEX IDX_1981A66D16A23D2C ON operation');
  39.         $this->addSql('DROP INDEX IDX_1981A66D362CF80A ON operation');
  40.         $this->addSql('DROP INDEX IDX_1981A66D103AA9F4 ON operation');
  41.         $this->addSql('ALTER TABLE operation ADD supplier_id INT DEFAULT NULL, ADD provider_id INT DEFAULT NULL, ADD slot_id INT DEFAULT NULL, DROP source_supplier_id, DROP source_provider_id, DROP source_slot_id');
  42.         $this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D2ADD6D8C FOREIGN KEY (supplier_id) REFERENCES supplier (id)');
  43.         $this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66DA53A8AA FOREIGN KEY (provider_id) REFERENCES provider (id)');
  44.         $this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D59E5119C FOREIGN KEY (slot_id) REFERENCES slot (id)');
  45.         $this->addSql('CREATE INDEX IDX_1981A66D2ADD6D8C ON operation (supplier_id)');
  46.         $this->addSql('CREATE INDEX IDX_1981A66DA53A8AA ON operation (provider_id)');
  47.         $this->addSql('CREATE INDEX IDX_1981A66D59E5119C ON operation (slot_id)');
  48.     }
  49. }