<?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 Version20230809022123 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 machine_paper_size_matrix (id INT AUTO_INCREMENT NOT NULL, machine_id INT NOT NULL, paper_size_id INT NOT NULL, setup INT NOT NULL, INDEX IDX_D90CEE6DF6B75B26 (machine_id), INDEX IDX_D90CEE6D4929FAC6 (paper_size_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE machine_paper_size_matrix ADD CONSTRAINT FK_D90CEE6DF6B75B26 FOREIGN KEY (machine_id) REFERENCES machine (id)');
$this->addSql('ALTER TABLE machine_paper_size_matrix ADD CONSTRAINT FK_D90CEE6D4929FAC6 FOREIGN KEY (paper_size_id) REFERENCES paper_size (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE machine_paper_size_matrix DROP FOREIGN KEY FK_D90CEE6DF6B75B26');
$this->addSql('ALTER TABLE machine_paper_size_matrix DROP FOREIGN KEY FK_D90CEE6D4929FAC6');
$this->addSql('DROP TABLE machine_paper_size_matrix');
}
}