Files
myep-team/migrations/Version20231025131443.php
T
2023-10-25 15:22:38 +02:00

36 lines
1.3 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 Version20231025131443 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 DROP FOREIGN KEY FK_A45BDDC1DF01D017');
$this->addSql('DROP INDEX IDX_A45BDDC1DF01D017 ON application');
$this->addSql('ALTER TABLE application ADD comment_visible TINYINT(1) NOT NULL, DROP remarks_by_id, CHANGE remarks comment LONGTEXT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE application ADD remarks_by_id INT DEFAULT NULL, DROP comment_visible, CHANGE comment remarks LONGTEXT 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)');
}
}