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

Support Multiple databases create cli

Open
#1,239 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, mysql
Domain
cli, database

Research direction

Start with the sequelize db:create CLI entry point and the config.js example showing multiple named databases, then trace how the dialect is resolved for the command. Done means the command creates both configured databases and reports their names instead of raising the undefined-dialect error.

Written by the indexing model from the issue text.

Description

What you are doing?

<config.js>

module.exports = {
  "development": {
    "databases": {
      "database1": {
        ...
        "dialect": "mysql"
      },
      "database2": {
        ...
        "dialect": "mysql"
      }
    }
  }
}

What do you expect to happen?

I want to input "sequelize db:create" in terminal

Loaded configuration file "config\config.js".
Using environment "development".
Database **database1, database2** created.

What is actually happening?

Just print Error message!!!
example...

ERROR: Dialect undefined does not support db:create / db:drop commands
I want "databases" set in config.js to be applied to create.

I know that read databases based on config.js and setting models in sequelize.
But cli doesn't work to create "databases" that setted within config.js.
Is there any way to do this(Create "databases" using cli or any other way)?

Dialect: mysql
Database version: Ver 8.0.28 for Win64 on x86_64
Sequelize CLI version: ^6.4.1
Sequelize version: ^6.19.0

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.