This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
bee-backend-ARCHIVED/data/migrations/log/Version20230922150649.php
2024-08-24 21:02:48 +00:00

41 lines
869 B
PHP

<?php
declare(strict_types=1);
namespace Bee\Migrations\Log;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230922150649 extends AbstractMigration
{
public function getDescription(): string
{
return "Create Table 'log'";
}
public function up(Schema $schema): void
{
$query = 'CREATE TABLE log (
id BINARY(16) NOT NULL,
message TEXT NOT NULL,
context JSON DEFAULT NULL,
level INT NOT NULL ,
level_name VARCHAR(50) NOT NULL,
extra JSON DEFAULT NULL,
created_at datetime NOT NULL,
PRIMARY KEY (id)
)';
$this->addSql($query);
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE log');
}
}