api/src/Migrations/Version20201119113000.php
<?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 Version20201119113000 extends AbstractMigration
{
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
// $this->addSql('INSERT INTO article (`id`, `title`, `status`) VALUES (30, "ACCESSIBILITY", 1)');
// Fix solidaryExclusive at null instead of 0
$this->addSql('UPDATE criteria inner join proposal on proposal.criteria_id = criteria.id SET criteria.solidary_exclusive = 0 WHERE proposal.private = 0 and criteria.solidary_exclusive is NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
}
}