id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
371,New --database option for migrate command doesn't work,agodfrey@…,andrew,"I attempted using the --database option when migrating and noticed it always used the default database.

settings.py:
DATABASES = {
    'default': {
        'NAME': 'test',
        'ENGINE': 'django.db.backends.mysql',
        'USER': 'test',
    },
    'test': {
        'NAME': 'test1',
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'USER': 'test1',
    },
}

Using the command:
python manage.py migrate appname --database=test

The default database is used instead of 'test'.  It appears the correct database is set at [http://south.aeracode.org/browser/south/migration/__init__.py#L177]

However, [http://south.aeracode.org/browser/south/migration/migrators.py] uses the import: from south.db import db.  When it does that the last line of that file [http://south.aeracode.org/browser/south/db/__init__.py#L75] always sets the db to the default.  So even though we passed in a different database at the command line it is always overwritten during the import.",defect,closed,major,0.7,commands,0.6-pre,fixed,"command, database, multiple",
