I am working on http://code.djangoproject.com/ticket/6148
This includes a new option "db_schema" that's been added to a models
It involves using a custom schema for any model that has this
The problem comes when testing.
In postgres a test database is created and inside that one this or
these new schemas are created. Works fine when creating and dropping
the test database.
In mysql schemas are treated as ordinary databases. So a test database
gets created. I can even create the "databases" that correspond to
db_schema but these will be the same as when running "live". Not
created INSIDE the test database but in parallel to the test database
and with the same name as when running normally.
What I want to do is to alter/patch the value in db_schema with
something when create_test_db is used but not else.
This db_schema attribute has to be set at the time contribute_to_class
method of django.db.models.Options is called or before because it is
Any hints or ideas are most welcome...