<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220228044306 extends AbstractMigration
{
public function getDescription(): string
{
return 'add table work_days';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE work_days (id UUID NOT NULL, day DATE NOT NULL, day_type VARCHAR(10) DEFAULT \'workday\' NOT NULL, is_weekend BOOLEAN DEFAULT \'false\' NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_12274D5EE5A02990 ON work_days (day)');
$this->addSql('COMMENT ON COLUMN work_days.id IS \'(DC2Type:uuid)\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE work_days');
}
}