<?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 Version20210502105922 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 trial (id INT AUTO_INCREMENT NOT NULL, project_id INT NOT NULL, trial_date DATETIME DEFAULT NULL, observations VARCHAR(255) DEFAULT NULL, humidity NUMERIC(5, 2) DEFAULT NULL, primary_packaging_type VARCHAR(50) DEFAULT NULL, primary_packaging_weight NUMERIC(10, 4) DEFAULT NULL, secondary_packaging_type VARCHAR(50) DEFAULT NULL, secondary_packaging_weight NUMERIC(10, 4) DEFAULT NULL, plaston_area_o VARCHAR(15) DEFAULT NULL, plaston_area_r VARCHAR(15) DEFAULT NULL, plaston_largo_o VARCHAR(15) DEFAULT NULL, plaston_largo_r VARCHAR(15) DEFAULT NULL, plaston_ancho_o VARCHAR(15) DEFAULT NULL, plaston_ancho_r VARCHAR(15) DEFAULT NULL, plaston_alto_o VARCHAR(15) DEFAULT NULL, plaston_alto_r VARCHAR(15) DEFAULT NULL, galleta_area_o VARCHAR(15) DEFAULT NULL, galleta_area_r VARCHAR(15) DEFAULT NULL, galleta_largo_o VARCHAR(15) DEFAULT NULL, galleta_largo_r VARCHAR(15) DEFAULT NULL, galleta_ancho_o VARCHAR(15) DEFAULT NULL, galleta_ancho_r VARCHAR(15) DEFAULT NULL, galleta_alto_o VARCHAR(15) DEFAULT NULL, galleta_alto_r VARCHAR(15) DEFAULT NULL, plaston_superficio_o VARCHAR(15) DEFAULT NULL, plaston_superficie_r VARCHAR(15) DEFAULT NULL, plaston_perdida_o VARCHAR(15) DEFAULT NULL, plaston_perdida_r VARCHAR(15) DEFAULT NULL, crudo_diametro_o VARCHAR(15) DEFAULT NULL, crudo_diametro_r VARCHAR(15) DEFAULT NULL, crudo_largo_o VARCHAR(15) DEFAULT NULL, crudo_largo_r VARCHAR(15) DEFAULT NULL, crudo_ancho_o VARCHAR(15) DEFAULT NULL, crudo_ancho_r VARCHAR(15) DEFAULT NULL, crudo_alto_r VARCHAR(15) DEFAULT NULL, crudo_alto_o VARCHAR(15) DEFAULT NULL, horneado_diametro_o VARCHAR(15) DEFAULT NULL, horneado_diametro_r VARCHAR(15) DEFAULT NULL, horneado_largo_o VARCHAR(15) DEFAULT NULL, horneado_largo_r VARCHAR(15) DEFAULT NULL, horneado_ancho_o VARCHAR(15) DEFAULT NULL, horneado_ancho_r VARCHAR(15) DEFAULT NULL, horneado_alto_o VARCHAR(15) DEFAULT NULL, horneado_alto_r VARCHAR(15) DEFAULT NULL, desarrollo_diametro_o VARCHAR(15) DEFAULT NULL, desarrollo_diametro_r VARCHAR(15) DEFAULT NULL, desarrollo_largo_o VARCHAR(15) DEFAULT NULL, desarrollo_largo_r VARCHAR(15) DEFAULT NULL, desarrollo_ancho_o VARCHAR(15) DEFAULT NULL, desarrollo_ancho_r VARCHAR(15) DEFAULT NULL, desarrollo_alto_o VARCHAR(15) DEFAULT NULL, desarrollo_alto_r VARCHAR(15) DEFAULT NULL, INDEX IDX_74A25E3F166D1F9C (project_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE trial ADD CONSTRAINT FK_74A25E3F166D1F9C FOREIGN KEY (project_id) REFERENCES project (id)');
$this->addSql('ALTER TABLE recipe_test CHANGE state state INT NOT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE trial');
$this->addSql('ALTER TABLE recipe_test CHANGE state state INT DEFAULT 0 NOT NULL');
}
}