<?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 Version20230207082458 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 salary_period ADD employee_department_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE salary_period ADD CONSTRAINT FK_13FB5AC5D8728164 FOREIGN KEY (employee_department_id) REFERENCES department (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_13FB5AC5D8728164 ON salary_period (employee_department_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE salary_period DROP CONSTRAINT FK_13FB5AC5D8728164');
$this->addSql('DROP INDEX IDX_13FB5AC5D8728164');
$this->addSql('ALTER TABLE salary_period DROP employee_department_id');
}
}