<?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 Version20221019223559 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('CREATE TABLE upload_documents (id INT AUTO_INCREMENT NOT NULL, link VARCHAR(255) DEFAULT NULL, file_name VARCHAR(255) DEFAULT NULL, full_file_name VARCHAR(255) DEFAULT NULL, userId INT NOT NULL, decontId INT NOT NULL, INDEX IDX_9F2F90A764B64DCC (userId), INDEX IDX_9F2F90A79E6A9EB3 (decontId), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE upload_documents ADD CONSTRAINT FK_9F2F90A764B64DCC FOREIGN KEY (userId) REFERENCES `user` (id)');
$this->addSql('ALTER TABLE upload_documents ADD CONSTRAINT FK_9F2F90A79E6A9EB3 FOREIGN KEY (decontId) REFERENCES decont_angajat (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE upload_documents');
}
}