Skip to content
Snippets Groups Projects
Commit 8c237ca6 authored by sebastien dupuy's avatar sebastien dupuy
Browse files

Correctif pour les types de structures qui n existent plus et sur les civilités des legacy

parent ec0644a5
No related branches found
No related tags found
No related merge requests found
Pipeline #46146 failed
<?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 Version20230421062109 extends AbstractMigration
{
public function getDescription() : string
{
return 'Replace departmental_union type to syndicat and replace "m " to "m" for legal_civility for collectivity;';
}
public function up(Schema $schema): void
{
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('UPDATE user_collectivity SET type="syndicat" WHERE type="departmental_union"');
$this->addSql('UPDATE user_collectivity SET legal_manager_civility = "m" WHERE legal_manager_civility = "m "');
}
public function down(Schema $schema): void
{
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment