<?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 Version20230707181341 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE payment ADD employee_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE payment ADD CONSTRAINT FK_6D28840D8C03F15C FOREIGN KEY (employee_id) REFERENCES employee (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_6D28840D8C03F15C ON payment (employee_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE payment DROP CONSTRAINT FK_6D28840D8C03F15C');
$this->addSql('DROP INDEX IDX_6D28840D8C03F15C');
$this->addSql('ALTER TABLE payment DROP employee_id');
}
}