Ticket #702 (assigned defect)

Opened 5 years ago

Last modified 4 years ago

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:


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...
  Creating table aaa
  Creating table bbb
  No fixtures found.
  Running migrations for ccc:
   - Migrating forwards to 0001_initial.
  No fixtures found.

   > aaa
   > bbb

   - ccc

  Creating test database 'the_second_database'...
  Creating table ddd
  Creating table eee
  No fixtures found.
  Traceback (most recent call last):
  django.db.utils.DatabaseError: no such table: south_migrationhistory

What to do about this? A workaround is to add


to my settings.py, btw.

Change History

comment:1 Changed 5 years ago by andrew

  • Status changed from new to infoneeded
  • Milestone set to 1.0

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

Note: See TracTickets for help on using tickets.