Files
myep-team/migrations/Version20231021133634.php
T
2023-10-21 16:41:57 +02:00

36 lines
1.1 KiB
PHP

<?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 Version20231021133634 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 application ADD remarks_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE application ADD CONSTRAINT FK_A45BDDC1DF01D017 FOREIGN KEY (remarks_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_A45BDDC1DF01D017 ON application (remarks_by_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE application DROP FOREIGN KEY FK_A45BDDC1DF01D017');
$this->addSql('DROP INDEX IDX_A45BDDC1DF01D017 ON application');
$this->addSql('ALTER TABLE application DROP remarks_by_id');
}
}