diff options
| author | Marcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de> | 2024-02-06 08:37:55 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-02-06 08:37:55 +0000 |
| commit | 61effe4aa01d1fef51b377e575c6bc448ce03e96 (patch) | |
| tree | 7bf5f2b8c07800f25c238506978c70660526b7d8 /cli/Commands | |
| parent | b50d00e535e3401a4d602498182726fa2a67aeec (diff) | |
Fix #3711.
Closes #3711
Merge request studip/studip!2585
Diffstat (limited to 'cli/Commands')
| -rw-r--r-- | cli/Commands/DB/MoveMatrikelnummer.php (renamed from cli/Commands/Migrate/MigrateMatrikelnummer.php) | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/cli/Commands/Migrate/MigrateMatrikelnummer.php b/cli/Commands/DB/MoveMatrikelnummer.php index fbad2d8..251aba5 100644 --- a/cli/Commands/Migrate/MigrateMatrikelnummer.php +++ b/cli/Commands/DB/MoveMatrikelnummer.php @@ -1,24 +1,28 @@ <?php -namespace Studip\Cli\Commands\Migrate; +namespace Studip\Cli\Commands\DB; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -class MigrateMatrikelnummer extends Command +class MoveMatrikelnummer extends Command { - protected static $defaultName = 'migrate:matrikelnummer'; + protected static $defaultName = 'db:move_matrikelnummer'; - protected function configure() : void + protected function configure(): void { - $this->setDescription('Migrates the "Matrikelnummer" datafield into the matriculation_number column of the auth_user_md5 table.'); - $this->setHelp('This command migrates the "Matrikelnummer" datafield into the matriculation_number column of the auth_user_md5 table. The ID of the datafield must be provided. The datafield is not deleted in the migration process.'); + $this->setDescription( + 'Migrates the "Matrikelnummer" datafield into the matriculation_number column of the auth_user_md5 table.' + ); + $this->setHelp( + 'This command migrates the "Matrikelnummer" datafield into the matriculation_number column of the auth_user_md5 table. The ID of the datafield must be provided. The datafield is not deleted in the migration process.' + ); $this->addOption('id', 'i', InputOption::VALUE_REQUIRED, 'The ID of the "Matrikelnummer" datafield.', null); } - protected function execute(InputInterface $input, OutputInterface $output) : int + protected function execute(InputInterface $input, OutputInterface $output): int { $datafield_id = $input->getOption('id'); if (!$datafield_id) { @@ -56,10 +60,7 @@ class MigrateMatrikelnummer extends Command } }; - \DatafieldEntryModel::findEachByDatafield_id( - $modifier, - $datafield->id - ); + \DatafieldEntryModel::findEachByDatafield_id($modifier, $datafield->id); return Command::SUCCESS; } |
