migrations/2019/10/Version20191009081048.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;final class Version20191009081048 extends AbstractMigration{public function up(Schema $schema): void{$this->addSql('ALTER TABLE profit_calculation_row ADD date_time DATETIME');$this->addSql('UPDATE profit_calculation_row pcr SET pcr.date_time = CONCAT("1-", pcr.month, "-1 00:00:00")');$this->addSql('ALTER TABLE profit_calculation_row DROP month');}public function down(Schema $schema): void{$this->addSql('ALTER TABLE profit_calculation_row ADD month INT UNSIGNED NOT NULL');$this->addSql('UPDATE profit_calculation_row pcr SET pcr.month = MONTH(pcr.date_time)');$this->addSql('ALTER TABLE profit_calculation_row DROP date_time');}}