Prometheus
Prometheus

Reputation: 33655

Django South migration on production servers?

On my local development screen I'm using South data migration. I deploy my apps to using git to my production server. I have placed all /south/ folder into my git .ignore file. However, south is still listed in my installed apps.

My question is. Should I include south on the production server also, or just split my setting files out local and production with south only install on local.

How do others handle this?

Thanks

Upvotes: 0

Views: 1369

Answers (2)

Steve Mayne
Steve Mayne

Reputation: 22858

I personally use south on my production server. This allows me to run data migrations on the live db using the normal manage.py migrate command. This ensures that the live db is migrated to the correct point for the deployed version of the code.

Upvotes: 1

furins
furins

Reputation: 5048

I see no reasons to not install/use south in your production server, it will provide you a way to alter the db schema also in production server in the future. I usually do that and I manage both development and production schema migrations using fabric.

Splitting settings file may be required anyhow (e.g. for DB/Debug settings)

You may also conditionally add south to INSTALLED_APPS basing on something in your settings.py:

e.g.

if DEBUG:  // or hostname == 'localhost', path=='...', anything else
    INSTALLED_APPS += ('south',)

Upvotes: 2

Related Questions