<?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 Version20250701124238 extends AbstractMigration
{
public function getDescription(): string
{
return "Ajout d'un LOCK pour les insertions des points history";
}
public function up(Schema $schema): void
{
$now = (new \DateTime())->format('Y-m-d H:i:s');
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('INSERT INTO app_parameter (section, parameter_key, string_value, int_value, float_value, bool_value, array_value, created_at, updated_at) VALUES ("LOCK", "app.point_history.lock", NULL, NULL, NULL, 1, NULL, "' . $now . '", "' . $now . '")');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DELETE FROM app_parameter WHERE section = "LOCK" AND parameter_key = "app.point_history.lock"');
}
}