<?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 Version20220318072938 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add table plan_day';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SEQUENCE plan_day_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE plan_day (id INT NOT NULL, hub_user_id UUID NOT NULL, day DATE NOT NULL, norm_time SMALLINT NOT NULL DEFAULT 0, non_working_type VARCHAR(255) DEFAULT \'workday\', PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_E94192CDA76ED395 ON plan_day (hub_user_id)');
$this->addSql('CREATE INDEX ON plan_day (day)');
$this->addSql('COMMENT ON COLUMN plan_day.hub_user_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 SEQUENCE plan_day_id_seq CASCADE');
$this->addSql('DROP TABLE plan_day');
}
}