<?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 Version20220408102534 extends AbstractMigration
{
public function getDescription(): string
{
return 'Correction type of the norm_full_day, norm_short_day fields of the work_position table, norm_time field of the plan_day';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE plan_day ALTER norm_time TYPE DOUBLE PRECISION');
$this->addSql('ALTER TABLE plan_day ALTER norm_time DROP DEFAULT');
$this->addSql('ALTER TABLE work_position ALTER norm_full_day TYPE DOUBLE PRECISION');
$this->addSql('ALTER TABLE work_position ALTER norm_full_day DROP DEFAULT');
$this->addSql('ALTER TABLE work_position ALTER norm_short_day TYPE DOUBLE PRECISION');
$this->addSql('ALTER TABLE work_position ALTER norm_short_day DROP DEFAULT');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE work_position ALTER norm_full_day TYPE INT');
$this->addSql('ALTER TABLE work_position ALTER norm_full_day DROP DEFAULT');
$this->addSql('ALTER TABLE work_position ALTER norm_short_day TYPE INT');
$this->addSql('ALTER TABLE work_position ALTER norm_short_day DROP DEFAULT');
$this->addSql('ALTER TABLE plan_day ALTER norm_time TYPE SMALLINT');
$this->addSql('ALTER TABLE plan_day ALTER norm_time DROP DEFAULT');
}
}