<?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 Version20231218143805 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_daily_routine_job_mapping ADD id INT AUTO_INCREMENT NOT NULL, ADD position INT DEFAULT NULL, CHANGE job_daily_routine_id job_daily_routine_id INT DEFAULT NULL, CHANGE job_id job_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_daily_routine_job_mapping MODIFY id INT NOT NULL');
$this->addSql('DROP INDEX `PRIMARY` ON job_daily_routine_job_mapping');
$this->addSql('ALTER TABLE job_daily_routine_job_mapping DROP id, DROP position, CHANGE job_daily_routine_id job_daily_routine_id INT NOT NULL, CHANGE job_id job_id INT NOT NULL');
$this->addSql('ALTER TABLE job_daily_routine_job_mapping ADD PRIMARY KEY (job_daily_routine_id, job_id)');
}
}