<?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 Version20240314183709 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// "glucose" will be removed in a later migration
$this->addSql('ALTER TABLE cardiometabolic_profiles
ADD glucose DOUBLE PRECISION NOT NULL,
ADD creatinine DOUBLE PRECISION NOT NULL,
ADD urea DOUBLE PRECISION NOT NULL,
ADD e_gfr DOUBLE PRECISION NOT NULL'
);
// "glucose" will be renamed to "fasting_blood_sugar" in a later migration
$this->addSql(
'ALTER TABLE health_report_submissions
ADD total_cholesterol DOUBLE PRECISION DEFAULT NULL,
ADD hdl_cholesterol DOUBLE PRECISION DEFAULT NULL,
ADD glucose DOUBLE PRECISION DEFAULT NULL,
ADD hba1c DOUBLE PRECISION DEFAULT NULL,
ADD creatinine DOUBLE PRECISION DEFAULT NULL,
ADD urea DOUBLE PRECISION DEFAULT NULL'
);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql(
'ALTER TABLE cardiometabolic_profiles DROP glucose, DROP creatinine, DROP urea, DROP e_gfr'
);
$this->addSql(
'ALTER TABLE health_report_submissions
DROP total_cholesterol,
DROP hdl_cholesterol,
DROP glucose,
DROP hba1c,
DROP creatinine,
DROP urea'
);
}
}