#26529: migration: Add argument or flag which indicates the current db
-------------------------------+-----------------------
Reporter: ktugan | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Keywords: migration
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-----------------------
'''State:'''
Two DB's which should have all the same models.
'''Problem:'''
Running a RunPython migration on the second database fails since it still
operates on the default database.
{{{
python manage.py migrate --database=seconddb
}}}
Except the hacky way, reading the sys.argv, there is no way to determine
the current db to act upon that db.
'''Solution:'''
Add a parameter (or extend an existing) to include a variable "database"
which contains the current db.
{{{apps.get_model}}} should be able to get the schema for a specific db.
--
Ticket URL: <https://code.djangoproject.com/ticket/26529>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.cef3a63a1c79e197271eb5c44c04b7dd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.