<?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 Version20210520062429 extends AbstractMigration
{
public function getDescription(): string
{
return 'alter type to TIMESTAMP to date_hiring, date_dismissal in table developer, date_singing in project';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$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('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');
}
}