<?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 Version20230809044512 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_cost_matrix (id INT AUTO_INCREMENT NOT NULL, machine_paper_size_matrix_id INT DEFAULT NULL, start_qty INT NOT NULL, cost NUMERIC(10, 4) NOT NULL, INDEX IDX_4342758BEF050FD3 (machine_paper_size_matrix_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE machine_paper_size_time_matrix (id INT AUTO_INCREMENT NOT NULL, machine_paper_size_matrix_id INT DEFAULT NULL, start_qty INT NOT NULL, time INT NOT NULL, INDEX IDX_1D827CD2EF050FD3 (machine_paper_size_matrix_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE machine_paper_size_cost_matrix ADD CONSTRAINT FK_4342758BEF050FD3 FOREIGN KEY (machine_paper_size_matrix_id) REFERENCES machine_paper_size_matrix (id)');
$this->addSql('ALTER TABLE machine_paper_size_time_matrix ADD CONSTRAINT FK_1D827CD2EF050FD3 FOREIGN KEY (machine_paper_size_matrix_id) REFERENCES machine_paper_size_matrix (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_cost_matrix DROP FOREIGN KEY FK_4342758BEF050FD3');
$this->addSql('ALTER TABLE machine_paper_size_time_matrix DROP FOREIGN KEY FK_1D827CD2EF050FD3');
$this->addSql('DROP TABLE machine_paper_size_cost_matrix');
$this->addSql('DROP TABLE machine_paper_size_time_matrix');
}
}