Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support for Improved Migration Directory Structure and Configuration

Open
#1,349 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
cli

Research direction

Start by reviewing how config.js, .sequelizerc, and config.json currently define the migrations directory and how the CLI discovers migration files. Compare that behavior with the requested nested folders and multiple external sources, then review the documentation and examples that would need updating. Done means the supported configuration and directory behavior are implemented and documented with the requested use cases.

Written by the indexing model from the issue text.

Description

type: feature

Description:
I would like to propose a feature enhancement to support a more flexible and organized migration directory structure in Sequelize, along with improvements in the configuration setup. The current options of using config.js, .sequelizerc, and config.json provide a basic setup but lack the ability to handle complex directory structures and additional migration sources.

Feature Requests:

  1. Nested migration folders: Enable the ability to organize migrations within multiple nested folders based on microservices, releases, or other criteria. This would improve modularity and organization in projects with a large number of migrations.

Sample Directory Structure:

- migrations
  - shared
    - utility
      - <shared_utility_files>.js
    - common
      - <shared_common_files>.js
    - <shared_migration_files>.js
  - microservices
    - <microservice1>
      - <release1>
        - <microservice1_release1_migration_files>.js
      - <release2>
        - <microservice1_release2_migration_files>.js
      - ...
    - <microservice2>
      - <release1>
        - <microservice2_release1_migration_files>.js
      - <release2>
        - <microservice2_release2_migration_files>.js
      - ...
    - ...
  1. Additional migration sources: Allow the specification of multiple migration sources outside the default migrations folder. This would provide flexibility to manage migrations across different directories, enabling better separation of concerns for microservices or modules.

  2. Clear documentation and examples: Enhance the documentation with clear examples and use cases to guide users in setting up and utilizing the advanced migration directory structure and configuration options effectively.

Expected Benefits:

  • Improved organization and scalability for projects with multiple microservices or complex directory structures.
  • Better separation of concerns and modularity in managing migrations.
  • Flexibility in using multiple migration sources, and accommodating diverse project requirements.
  • Greater customization and control over configuration options.
  • Improved developer experience and easier maintenance of migrations.

I believe these enhancements would greatly benefit developers working with Sequelize and enhance the overall migration management experience.

Dominant language
JavaScript
Stars
2.6k
Forks
524
PR merge metrics
No merged PRs in 30d

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.

More from sequelize/cli

All issues in sequelize/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.