Question

when I do a syncdb I get the following error everytime:

Not synced (use migrations):
 - deals
 - analytics
(use ./manage.py migrate to migrate these)

And when I run sudo python manage.py migrate. I get the following

Running migrations for deals:
- Nothing to migrate.
 - Loading initial data for deals.
No fixtures found.
Running migrations for analytics:
- Nothing to migrate.
 - Loading initial data for analytics.
No fixtures found.

I highly appreciate your help

Was it helpful?

Solution

From the output, it seems like the database is already synchronized with the migrations. There are no problematic errors. (Although you shouldn't really be root to run the migrations.)

If you're looking into creating more migrations, use the south documentation, which usually is just running the following after you modify the models:

python manage.py schemamigration --auto <APP>

And then use python manage.py migrate to apply the changes.

OTHER TIPS

It looks like migrations have been already passed. Check south_migationhistory table in db.

If you want to sync new db for apps which has migrations just disable south in settings.py.

Have you ran a schemamigration initial yet?

./manage.py schemamigration deals --initial
./manage.py migrate deals

if you get the error, db already excists do this:

./manage.py schemamigration deals --initial
./manage.py migrate deals --fake
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top