cakephp / cakephp/phinx

Allow a count for rollback/migrate.

Open
#258 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

Hi.

A feature request.

I'm doing some incremental development, but I need to be able to test things backwards and forwards through the migrations.

Currently, I have to track which timestamp to use as my target, but I can see it is always 3 migrations (or 4, 5, etc. as I develop).

A new option of --count (-o) Number of migrations to process would be useful for this.

Regards,

Richard Quadling.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the command handling for migrate and rollback, then trace how migrations are selected and processed. Add coverage for the proposed --count (-o) option in both directions, and consider the work done when it processes the requested number of migrations while preserving existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli, database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.