<?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 Version20230726031602 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 price_matrix (id INT AUTO_INCREMENT NOT NULL, calculator_id INT DEFAULT NULL, start_qty INT NOT NULL, admin NUMERIC(10, 3) NOT NULL, sales NUMERIC(10, 3) NOT NULL, overheads NUMERIC(10, 3) NOT NULL, profit NUMERIC(10, 3) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_B5AAE99FACF2C4B8 (calculator_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE price_matrix ADD CONSTRAINT FK_B5AAE99FACF2C4B8 FOREIGN KEY (calculator_id) REFERENCES calculator (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE price_matrix DROP FOREIGN KEY FK_B5AAE99FACF2C4B8');
$this->addSql('DROP TABLE price_matrix');
}
}