<?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 Version20220617093643 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE event ADD coef_majoration DOUBLE PRECISION DEFAULT NULL, ADD coef_margin DOUBLE PRECISION DEFAULT NULL, ADD specialist_price DOUBLE PRECISION DEFAULT NULL');
$this->addSql('ALTER TABLE workshop ADD coef_majoration DOUBLE PRECISION DEFAULT NULL');
$this->addSql("UPDATE `workshop` SET `coef_majoration` = 1 ");
$this->addSql("UPDATE event SET `coef_majoration` = 1 ");
$this->addSql("UPDATE event SET `coef_margin` = 1.3 ");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE event DROP coef_majoration, DROP coef_margin, DROP specialist_price');
$this->addSql('ALTER TABLE workshop DROP coef_majoration');
}
}