<?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 Version20240223103044 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 users ADD deleted_by_id INT DEFAULT NULL, ADD deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E9C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES users (id)');
$this->addSql('CREATE INDEX IDX_1483A5E9C76F1F52 ON users (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 users DROP FOREIGN KEY FK_1483A5E9C76F1F52');
$this->addSql('DROP INDEX IDX_1483A5E9C76F1F52 ON users');
$this->addSql('ALTER TABLE users DROP deleted_by_id, DROP deleted_at');
}
}