<?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 Version20240206080406 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function isTransactional(): bool
{
return false;
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE taxation_file_deleted (id INT AUTO_INCREMENT NOT NULL, taxation_id INT NOT NULL, deleted_by_employee_id INT DEFAULT NULL, deleted_by_collaborator_id INT DEFAULT NULL, file VARCHAR(255) NOT NULL, name VARCHAR(255) DEFAULT NULL, mime VARCHAR(255) DEFAULT NULL, size INT NOT NULL, type INT NOT NULL, hash VARCHAR(255) NOT NULL, cdate DATETIME NOT NULL, UNIQUE INDEX UNIQ_FA157BDD1B862B8 (hash), INDEX IDX_FA157BD2224E81F (taxation_id), INDEX IDX_FA157BD7A3400DE (deleted_by_employee_id), INDEX IDX_FA157BD7861CC6 (deleted_by_collaborator_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE taxation_file_deleted ADD CONSTRAINT FK_FA157BD2224E81F FOREIGN KEY (taxation_id) REFERENCES taxation (id)');
$this->addSql('ALTER TABLE taxation_file_deleted ADD CONSTRAINT FK_FA157BD7A3400DE FOREIGN KEY (deleted_by_employee_id) REFERENCES employee (id)');
$this->addSql('ALTER TABLE taxation_file_deleted ADD CONSTRAINT FK_FA157BD7861CC6 FOREIGN KEY (deleted_by_collaborator_id) REFERENCES collaborator (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE taxation_file_deleted');
}
}