<?php
declare(strict_types=1);
namespace SuppliersBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240819093716 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context ADD deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context ADD CONSTRAINT FK_CF412AA7C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_CF412AA7C76F1F52 ON suppliers_bundle__supplier_context (deleted_by_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context DROP FOREIGN KEY FK_CF412AA7C76F1F52');
$this->addSql('DROP INDEX IDX_CF412AA7C76F1F52 ON suppliers_bundle__supplier_context');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context DROP deleted_by_id, DROP deleted_at');
}
}