Reputation: 2485
I'm trying to setup South in a way that the location of the migrations directories will be outside the Django directory. I can use SOUT_MIGRATION_MODULES to change the location of the directories within Django (to every place with an init file), but that's not enough for me. Unfortunately, SOUT_MIGRATION_MODULES doesn't accept full paths as input.
Can anybody explain how I can make South to place the migrations directories to a specified path outside the Django directory?
Update: This is the current directory structure:
Idealy I would like south to puth the migrations folder in the Data directory, which is outside the entire django project.
Upvotes: 0
Views: 219
Reputation: 22439
As it takes any module, just create a module outside your project and add it to your python path, e.g.:
SOUTH_MIGRATION_MODULES = {
'blog': '<my_foreign_module>.migrations.blog',
}
Another way would be to monkey patch South's Migrations
class, but really, you should avoid this hackery.
from south.migration.base import Migrations
def migrations_dir(self):
return #my_ugly_hack
Migrations.migrations_dir = migrations_dir
Upvotes: 2