Skip to content

Support for Organizing Migration Files in Subfolders #1302

@landsman

Description

@landsman

Hello,

I would like to kindly request support for organizing migration files into subdirectories within the main migrations directory.

As our projects grows and the number of migrations increases, maintaining all migration files in a single flat directory is becoming unnecessarily difficult.

Organizing migrations into subfolders (for example, by year and month) would help me better manage, navigate, and maintain them, especially in projects with long lifespans or many contributors.

Example of desired folder structure:

migrations/
├── 2024/
│   ├── 07/
│   └── 08/
└── 2025/
    ├── 01/

Each subfolder would contain the relevant migration files for its period.

Benefits for me:

  • Easier navigation and maintenance as migration count grows
  • Improved clarity when locating migrations from a specific time period
  • Logical grouping of related migrations and better scalability over time

If possible, I would highly appreciate an option to allow the tool to recursively scan for migration files within all subdirectories, instead of only in the root folder.

Backwards compatibility with the current flat structure would be ideal.
Thank you very much for considering this suggestion. I believe this would be a valuable enhancement for many users, and I would be more than happy to assist or test if this feature is accepted for development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions