<?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 Version20231016070633 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 restriction_article ADD deleted_by_id INT DEFAULT NULL, ADD deleted TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE restriction_article ADD CONSTRAINT FK_7D9A273DC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES users (id)');
$this->addSql('CREATE INDEX IDX_7D9A273DC76F1F52 ON restriction_article (deleted_by_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE restriction_article DROP FOREIGN KEY FK_7D9A273DC76F1F52');
$this->addSql('DROP INDEX IDX_7D9A273DC76F1F52 ON restriction_article');
$this->addSql('ALTER TABLE restriction_article DROP deleted_by_id, DROP deleted');
}
}