<?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 Version20260504102025 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('ALTER TABLE bike_log CHANGE distance_amount distance_amount NUMERIC(10, 2) DEFAULT \'0\' NOT NULL');
$this->addSql('ALTER TABLE kinestex_log ADD kinestex_exercise_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE kinestex_log ADD CONSTRAINT FK_9825AF73809A8150 FOREIGN KEY (kinestex_exercise_id) REFERENCES kinestex_exercise (id)');
$this->addSql('CREATE INDEX IDX_9825AF73809A8150 ON kinestex_log (kinestex_exercise_id)');
$this->addSql('ALTER TABLE run_log CHANGE distance_amount distance_amount NUMERIC(10, 2) DEFAULT \'0\' NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE kinestex_log DROP FOREIGN KEY FK_9825AF73809A8150');
$this->addSql('DROP INDEX IDX_9825AF73809A8150 ON kinestex_log');
$this->addSql('ALTER TABLE kinestex_log DROP kinestex_exercise_id');
$this->addSql('ALTER TABLE run_log CHANGE distance_amount distance_amount NUMERIC(10, 2) DEFAULT \'0.00\' NOT NULL');
$this->addSql('ALTER TABLE bike_log CHANGE distance_amount distance_amount NUMERIC(10, 2) DEFAULT \'0.00\' NOT NULL');
}
}