Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4579 Missing classname information on output during migrate:rollback #4584

Closed

Conversation

joelsodias
Copy link
Contributor

Fix #4579 Class information on output is missing during migrate:rollback command

Description

At system\Database\MigrationRunner.php

Changed removeHistory at line 774 using the same logic of addHistory to access the $history->class information, so I've been revoved getMigrationName method.

As far as I could see, getMigrationName method was just erasing the information with array_shift function (there was no "_" to work on)

After changing, all rollback passed to show all information correctly.

Now all classes are printed on command results

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Fix codeigniter4#4579 Class information on output is missing during migrate:rollback command

system\Database\MigrationRunner.php
Used the same logic of addHistory to revert on removeHistory
Now all classes are printed on command results
@MGatner
Copy link
Member

MGatner commented Apr 19, 2021

This looks good! I think that's the right change. Do you feel up to adding a test case for this? It should go in tests/system/Database/Migrations/MigrationRunnerTest.php and verify the CLI messages after one of the removal commands.

@paulbalandan paulbalandan added the tests needed Pull requests that need tests label May 9, 2021
@joelsodias joelsodias deleted the develop-issue-4579 branch May 19, 2021 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests needed Pull requests that need tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Class information on output is missing during migrate:rollback command
3 participants