migrations/Version20250305073950.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 Version20250305073950 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('CREATE TABLE job_market_view_type (id INT AUTO_INCREMENT NOT NULL, view_name VARCHAR(191) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE job_market ADD job_market_view_type_id INT DEFAULT NULL');
  20.         $this->addSql('ALTER TABLE job_market ADD CONSTRAINT FK_3BA8A84A94CFEC69 FOREIGN KEY (job_market_view_type_id) REFERENCES job_market_view_type (id)');
  21.         $this->addSql('CREATE INDEX IDX_3BA8A84A94CFEC69 ON job_market (job_market_view_type_id)');
  22.     }
  23.     public function down(Schema $schema): void
  24.     {
  25.         // this down() migration is auto-generated, please modify it to your needs
  26.         $this->addSql('ALTER TABLE job_market DROP FOREIGN KEY FK_3BA8A84A94CFEC69');
  27.         $this->addSql('DROP TABLE job_market_view_type');
  28.         $this->addSql('DROP INDEX IDX_3BA8A84A94CFEC69 ON job_market');
  29.         $this->addSql('ALTER TABLE job_market DROP job_market_view_type_id');
  30.     }
  31. }