<?php declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20250412094201 extends AbstractMigration
{
public function getDescription(): string
{
return 'Adds updatedAt field when entry got updated';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE payment_intent_events ADD updated_at DATETIME DEFAULT CURRENT_TIMESTAMP AFTER created_at');
$this->addSql('UPDATE payment_intent_events SET updated_at = created_at');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE payment_intent_events DROP updated_at');
}
}