<?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 Version20210519061251 extends AbstractMigration
{
public function getDescription(): string
{
return 'add table time_norm_day';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE time_norm_day (id UUID NOT NULL, date DATE NOT NULL, hours INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('COMMENT ON COLUMN time_norm_day.id IS \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE developer ALTER date_hiring TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
$this->addSql('ALTER TABLE developer ALTER date_hiring DROP DEFAULT');
$this->addSql('ALTER TABLE developer ALTER date_dismissal TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
$this->addSql('ALTER TABLE developer ALTER date_dismissal DROP DEFAULT');
$this->addSql('ALTER TABLE project ALTER date_singing TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
$this->addSql('ALTER TABLE project ALTER date_singing DROP DEFAULT');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE time_norm_day');
$this->addSql('ALTER TABLE developer ALTER date_hiring TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
$this->addSql('ALTER TABLE developer ALTER date_hiring DROP DEFAULT');
$this->addSql('ALTER TABLE developer ALTER date_dismissal TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
$this->addSql('ALTER TABLE developer ALTER date_dismissal DROP DEFAULT');
$this->addSql('ALTER TABLE project ALTER date_singing TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
$this->addSql('ALTER TABLE project ALTER date_singing DROP DEFAULT');
}
}