Modify ↓
Ticket #702 (assigned defect)
South + tests + multidb: missing south_migrationhistory table in the second db
| Reported by: | reinout@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | major | Milestone: | 1.0 |
| Component: | commands | Version: | unknown |
| Keywords: | Cc: |
Description
I sometimes work with a second database that's pretty much fixed. Existing database that the customer provides and that we only need to read. So I have router that only allows a single app's tables in there. When creating/migrating databases, everything is well as onthe the main database is created/migrated by default.
When running the tests, however, both databases are. So south complains that the second DB doesn't have a south_migrationhistory table.
$> bin/test ... Creating test database... Syncing... Creating table aaa Creating table bbb ... No fixtures found. Migrating... Running migrations for ccc: - Migrating forwards to 0001_initial. ... No fixtures found. Synced: > aaa > bbb Migrated: - ccc Creating test database 'the_second_database'... Syncing... Creating table ddd Creating table eee No fixtures found. Migrating... Traceback (most recent call last): ... django.db.utils.DatabaseError: no such table: south_migrationhistory
What to do about this? A workaround is to add
SOUTH_TESTS_MIGRATE = False
to my settings.py, btw.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

That's odd, South should be made in the other database. Do you have a custom database router installed?