template-backend/data/migrations/homepage/Version20230922085011.php
2024-02-14 20:08:01 +01:00

34 lines
756 B
PHP

<?php
declare(strict_types=1);
namespace Homepage\Migrations\Homepage;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230922085011 extends AbstractMigration
{
public function getDescription(): string
{
return "Create Table 'role'";
}
public function up(Schema $schema): void
{
$sql = "CREATE TABLE role (
id binary(16) NOT NULL,
product_id binary(16) DEFAULT NULL,
identifier varchar(255) UNIQUE NOT NULL,
PRIMARY KEY (id)
);";
$this->addSql($sql);
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE role;");
}
}