<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260503120000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add automatic strength point toggle for temperature charts.';
}
public function up(Schema $schema): void
{
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on postgresql.');
$this->addSql("ALTER TABLE measurement_settings ADD is_automatic_strength_points_enabled BOOLEAN DEFAULT FALSE NOT NULL");
$this->addSql("COMMENT ON COLUMN measurement_settings.is_automatic_strength_points_enabled IS 'Show automatic recipe strength points on temperature chart.'");
}
public function down(Schema $schema): void
{
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on postgresql.');
$this->addSql('ALTER TABLE measurement_settings DROP is_automatic_strength_points_enabled');
}
}