feat: log to database

This commit is contained in:
Björn Fromme
2025-04-25 08:36:23 +02:00
parent 9094e8c061
commit 5f9ac1a4e9
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ final class Version20250425063035 extends AbstractMigration
{ {
// this up() migration is auto-generated, please modify it to your needs // this up() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL' $this->addSql(<<<'SQL'
CREATE TABLE core_log_entry (id INT AUTO_INCREMENT NOT NULL, channel VARCHAR(255) NOT NULL, message VARCHAR(255) NOT NULL, context JSON DEFAULT NULL COMMENT '(DC2Type:json)', extra JSON DEFAULT NULL COMMENT '(DC2Type:json)', created_at DATETIME NOT NULL COMMENT '(DC2Type:datetime_immutable)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB CREATE TABLE log_entry (id INT AUTO_INCREMENT NOT NULL, channel VARCHAR(255) NOT NULL, message VARCHAR(255) NOT NULL, context JSON DEFAULT NULL COMMENT '(DC2Type:json)', extra JSON DEFAULT NULL COMMENT '(DC2Type:json)', created_at DATETIME NOT NULL COMMENT '(DC2Type:datetime_immutable)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
SQL); SQL);
} }
@@ -29,7 +29,7 @@ final class Version20250425063035 extends AbstractMigration
{ {
// this down() migration is auto-generated, please modify it to your needs // this down() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL' $this->addSql(<<<'SQL'
DROP TABLE core_log_entry DROP TABLE log_entry
SQL); SQL);
} }
} }
-1
View File
@@ -4,7 +4,6 @@ namespace App\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'core_log_entry')]
#[ORM\Entity] #[ORM\Entity]
class LogEntry class LogEntry
{ {