<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230406081139 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE job_requirement ADD modified_name TINYINT(1) DEFAULT 0 NOT NULL, ADD modified_description TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE job_requirement_mapping ADD id INT AUTO_INCREMENT NOT NULL, ADD keep_mapping TINYINT(1) DEFAULT 0 NOT NULL, CHANGE job_id job_id INT DEFAULT NULL, CHANGE job_requirement_id job_requirement_id INT DEFAULT NULL, DROP PRIMARY KEY, ADD PRIMARY KEY (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE job_requirement DROP modified_name, DROP modified_description');
$this->addSql('ALTER TABLE job_requirement_mapping MODIFY id INT NOT NULL');
$this->addSql('ALTER TABLE job_requirement_mapping DROP PRIMARY KEY');
$this->addSql('ALTER TABLE job_requirement_mapping DROP id, DROP keep_mapping, CHANGE job_id job_id INT NOT NULL, CHANGE job_requirement_id job_requirement_id INT NOT NULL');
$this->addSql('ALTER TABLE job_requirement_mapping ADD PRIMARY KEY (job_id, job_requirement_id)');
}
}