<?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 Version20231108145157 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 job_pdf (id INT AUTO_INCREMENT NOT NULL, job_id INT DEFAULT NULL, file_path_id INT DEFAULT NULL, filename VARCHAR(191) NOT NULL, INDEX IDX_CA25481DBE04EA9 (job_id), INDEX IDX_CA25481D820AEF50 (file_path_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE job_pdf ADD CONSTRAINT FK_CA25481DBE04EA9 FOREIGN KEY (job_id) REFERENCES job (id)');
$this->addSql('ALTER TABLE job_pdf ADD CONSTRAINT FK_CA25481D820AEF50 FOREIGN KEY (file_path_id) REFERENCES file_path (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE job_pdf DROP FOREIGN KEY FK_CA25481DBE04EA9');
$this->addSql('ALTER TABLE job_pdf DROP FOREIGN KEY FK_CA25481D820AEF50');
$this->addSql('DROP TABLE job_pdf');
}
}