<?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 Version20230112003846 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 media_object_payroll ADD payroll_id INT NOT NULL');
$this->addSql('ALTER TABLE media_object_payroll ADD CONSTRAINT FK_E8E4C826DBA340EA FOREIGN KEY (payroll_id) REFERENCES payroll (id)');
$this->addSql('CREATE INDEX IDX_E8E4C826DBA340EA ON media_object_payroll (payroll_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE media_object_payroll DROP FOREIGN KEY FK_E8E4C826DBA340EA');
$this->addSql('DROP INDEX IDX_E8E4C826DBA340EA ON media_object_payroll');
$this->addSql('ALTER TABLE media_object_payroll DROP payroll_id');
}
}