<?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 Version20230723182843 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 kpi_metric (id INT AUTO_INCREMENT NOT NULL, portfolio_company_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, actual LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', projected LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', format LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', start_date DATETIME NOT NULL, deadline DATETIME NOT NULL, qualitative TINYINT(1) NOT NULL, reporting_type VARCHAR(50) NOT NULL, show_projected TINYINT(1) NOT NULL, enable_documents TINYINT(1) NOT NULL, show_current_period_only TINYINT(1) NOT NULL, documents LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', description LONGTEXT DEFAULT NULL, fund_commentary LONGTEXT DEFAULT NULL, commentary LONGTEXT DEFAULT NULL, INDEX IDX_1603F9AAA5BDDEA4 (portfolio_company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE kpi_metric ADD CONSTRAINT FK_1603F9AAA5BDDEA4 FOREIGN KEY (portfolio_company_id) REFERENCES portfolio_company (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE kpi_metric');
}
}