generated from flo/template-backend
39 lines
925 B
PHP
39 lines
925 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Bee\Migrations\Bee;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
/**
|
|
* Auto-generated Migration: Please modify to your needs!
|
|
*/
|
|
final class Version20230922101355 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return "Create Table 'user_session'";
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$sql = "CREATE TABLE user_session (
|
|
id binary(16) NOT NULL,
|
|
user_id binary(16) DEFAULT NULL,
|
|
csrf binary(16) DEFAULT NULL,
|
|
updated_at datetime NOT NULL,
|
|
created_at datetime NOT NULL,
|
|
PRIMARY KEY (id)
|
|
);";
|
|
|
|
$this->addSql($sql);
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql("DROP TABLE role_permission;");
|
|
}
|
|
}
|