diff --git a/migrations/Version20251102221034.php b/migrations/Version20251102221034.php new file mode 100644 index 0000000..918996e --- /dev/null +++ b/migrations/Version20251102221034.php @@ -0,0 +1,35 @@ +addSql(<<<'SQL' + ALTER TABLE event_log ADD created_at DATETIME NULL, ADD updated_at DATETIME NULL + SQL); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql(<<<'SQL' + ALTER TABLE event_log DROP created_at, DROP updated_at + SQL); + } +} diff --git a/src/EventLog/Framework/Entity/EventLog.php b/src/EventLog/Framework/Entity/EventLog.php index 734d587..9f83fd3 100644 --- a/src/EventLog/Framework/Entity/EventLog.php +++ b/src/EventLog/Framework/Entity/EventLog.php @@ -6,10 +6,13 @@ use App\EventLog\Framework\Repository\EventLogRepository; use App\User\Framework\Entity\User; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; +use Gedmo\Timestampable\Traits\TimestampableEntity; #[ORM\Entity(repositoryClass: EventLogRepository::class)] class EventLog { + use TimestampableEntity; + #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(nullable: true)]