Skip to content

Single line command for migrating multiple databases #57

@SomeAB

Description

@SomeAB

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

I believe that the behavior of the --database flag can be improved slightly, while keeping the explicitness requirement

Proposed Behavior:

# Maintained Behavior: migrate is performed only on the 'default' database
./manage.py migrate 

# New Behavior: A single command needed to perform migrate on multiple databases
./manage.py migrate --database=default,users,customers

PS: Its possible that the proposed behavior is already supported and only the documentation needs updating about it? If so, then a documentation issue could be opened alternatively.

Problem

Image

While going through the official documentation, I noticed currently when you have multiple databases, and you want to migrate them, you have to write multiple commands

Current Behavior:

./manage.py migrate # Performs migration on only the 'default' database

# Then two commands more needed for the remaining two databases
./manage.py migrate --database=users 
./manage.py migrate --database=customers

Request or proposal

request

Additional Details

No response

Implementation Suggestions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Idea

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions