migrations/Version20260126065713.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 Version20260126065713 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 job DROP FOREIGN KEY FK_FBD8E0F8B23EF7AD');
  19.         $this->addSql('DROP INDEX IDX_FBD8E0F8B23EF7AD ON job');
  20.         $this->addSql('ALTER TABLE job DROP company_entity_id');
  21.         $this->addSql('ALTER TABLE mission DROP FOREIGN KEY FK_9067F23CB23EF7AD');
  22.         $this->addSql('DROP INDEX IDX_9067F23CB23EF7AD ON mission');
  23.         $this->addSql('ALTER TABLE mission DROP company_entity_id');
  24.         $this->addSql('ALTER TABLE task DROP FOREIGN KEY FK_527EDB25B23EF7AD');
  25.         $this->addSql('DROP INDEX IDX_527EDB25B23EF7AD ON task');
  26.         $this->addSql('ALTER TABLE task DROP company_entity_id');
  27.     }
  28.     public function down(Schema $schema): void
  29.     {
  30.         // this down() migration is auto-generated, please modify it to your needs
  31.         $this->addSql('ALTER TABLE job ADD company_entity_id INT DEFAULT NULL');
  32.         $this->addSql('ALTER TABLE job ADD CONSTRAINT FK_FBD8E0F8B23EF7AD FOREIGN KEY (company_entity_id) REFERENCES company_entity (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
  33.         $this->addSql('CREATE INDEX IDX_FBD8E0F8B23EF7AD ON job (company_entity_id)');
  34.         $this->addSql('ALTER TABLE mission ADD company_entity_id INT DEFAULT NULL');
  35.         $this->addSql('ALTER TABLE mission ADD CONSTRAINT FK_9067F23CB23EF7AD FOREIGN KEY (company_entity_id) REFERENCES company_entity (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
  36.         $this->addSql('CREATE INDEX IDX_9067F23CB23EF7AD ON mission (company_entity_id)');
  37.         $this->addSql('ALTER TABLE task ADD company_entity_id INT DEFAULT NULL');
  38.         $this->addSql('ALTER TABLE task ADD CONSTRAINT FK_527EDB25B23EF7AD FOREIGN KEY (company_entity_id) REFERENCES company_entity (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
  39.         $this->addSql('CREATE INDEX IDX_527EDB25B23EF7AD ON task (company_entity_id)');
  40.     }
  41. }