migrations/Version20220505165933.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 Version20220505165933 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 raport_ads_screenshot ADD CONSTRAINT FK_13C3ECA5D4A75161 FOREIGN KEY (raport_ads_id) REFERENCES raport_ads (id)');
  19.         $this->addSql('CREATE INDEX IDX_13C3ECA5D4A75161 ON raport_ads_screenshot (raport_ads_id)');
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.         // this down() migration is auto-generated, please modify it to your needs
  24.         $this->addSql('ALTER TABLE raport_ads_screenshot DROP FOREIGN KEY FK_13C3ECA5D4A75161');
  25.         $this->addSql('ALTER TABLE raport_ads_screenshot DROP FOREIGN KEY FK_13C3ECA5D4A75161');
  26.         $this->addSql('DROP INDEX idx_13c3eca5d4a75161 ON raport_ads_screenshot');
  27.         $this->addSql('CREATE INDEX IDX_D73A1FB2D4A75161 ON raport_ads_screenshot (raport_ads_id)');
  28.         $this->addSql('ALTER TABLE raport_ads_screenshot ADD CONSTRAINT FK_13C3ECA5D4A75161 FOREIGN KEY (raport_ads_id) REFERENCES raport_ads (id)');
  29.     }
  30. }