Skip to content

Commit

Permalink
add migration and composer.lock #3582
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeneuvrier committed Jan 24, 2025
1 parent da44776 commit 007eeaa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 154 deletions.
155 changes: 2 additions & 153 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions migrations/Version20250122140631.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20250122140631 extends AbstractMigration
{
public function getDescription(): string
{
return 'AutoAffectationRule change values of insee_to_include ';
}

public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE auto_affectation_rule CHANGE insee_to_include insee_to_include VARCHAR(255) DEFAULT NULL COMMENT \'Value possible null or an array of code insee\'');
$this->addSql("UPDATE auto_affectation_rule SET insee_to_include = null WHERE insee_to_include IN ('all','partner_list')");
}

public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE auto_affectation_rule CHANGE insee_to_include insee_to_include VARCHAR(255) NOT NULL COMMENT \'Value possible all, partner_list or an array of code insee\'');
}
}
2 changes: 1 addition & 1 deletion src/Form/AutoAffectationRuleType.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
],
])
->add('inseeToInclude', TextType::class, [
'label' => 'Périmètre géographique à inclure (facultatif)',
'label' => 'Code insee à inclure (facultatif)',
'attr' => [
'class' => 'fr-input',
],
Expand Down

0 comments on commit 007eeaa

Please sign in to comment.