27 lines
651 B
PHP
27 lines
651 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
final class Version20260202220500 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'Create absence types table';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql('CREATE TABLE absence_types (id SERIAL NOT NULL, code VARCHAR(10) NOT NULL, label VARCHAR(100) NOT NULL, color VARCHAR(20) NOT NULL, PRIMARY KEY(id))');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql('DROP TABLE absence_types');
|
|
}
|
|
}
|