Skip to content

Conversation

@albertcht
Copy link
Contributor

No description provided.

@albertcht
Copy link
Contributor Author

@limingxinleo @huangdijia 再麻煩有空時 review 一下了

@huangdijia huangdijia requested a review from Copilot September 24, 2025 22:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds batch option support to the migrate:rollback command, allowing users to rollback migrations by batch number instead of just by step count.

  • Adds a new --batch option to the rollback command that accepts a batch number
  • Implements getMigrationsByBatch() method in the migration repository to retrieve migrations by batch number
  • Updates rollback logic to handle batch-based rollbacks alongside existing step-based rollbacks

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
RollbackCommand.php Adds batch option and passes it to migrator
Migrator.php Implements batch rollback logic in getMigrationsForRollback method
MigrationRepositoryInterface.php Adds getMigrationsByBatch method signature
DatabaseMigrationRepository.php Implements getMigrationsByBatch method
DatabaseMigrationRollbackCommandTest.php Updates tests to include batch parameter and adds batch-specific test
DatabaseMigrationRepositoryTest.php Adds test for getMigrationsByBatch method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@albertcht
Copy link
Contributor Author

@huangdijia 上面的 review 調整完成了

huangdijia
huangdijia previously approved these changes Sep 30, 2025
@limingxinleo limingxinleo changed the title Feat: migrate:rollback 指令支援 batch option Support options batch for migrate:rollback. Sep 30, 2025
@limingxinleo limingxinleo merged commit 680facf into hyperf:master Sep 30, 2025
71 checks passed
@limingxinleo
Copy link
Member

节后回来发版本哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants