2

I am getting this after syncdb:

clime@den /var/www/loserti $ ./manage.py syncdb
Syncing...
Creating tables ...
Creating table tagging_tag
Creating table tagging_taggeditem
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.messages
 > django.contrib.staticfiles
 > django.contrib.admin
 > django.contrib.admindocs
 > django.contrib.flatpages
 > debug_toolbar
 > filebrowser
 > grappelli
 > tagging
 > south

Not synced (use migrations):
 - photologue
 - web
(use ./manage.py migrate to migrate these)

So I run migrate:

clime@den /var/www/loserti $ ./manage.py migrate
Running migrations for photologue:
- Nothing to migrate.
 - Loading initial data for photologue.
Installed 0 object(s) from 0 fixture(s)
Running migrations for web:
- Nothing to migrate.
 - Loading initial data for web.
Installed 0 object(s) from 0 fixture(s)

But the result of syncdb is still the same:

clime@den /var/www/loserti $ ./manage.py syncdb
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.messages
 > django.contrib.staticfiles
 > django.contrib.admin
 > django.contrib.admindocs
 > django.contrib.flatpages
 > debug_toolbar
 > filebrowser
 > grappelli
 > tagging
 > south

Not synced (use migrations):
 - photologue
 - web
(use ./manage.py migrate to migrate these)

How is that possible and how to fix it?

EDIT: Here is a faint idea. Could it be that I used ./manage.py syncdb at some point to create new tables for these apps and I should have used migrations instead?

clime
  • 8,695
  • 10
  • 61
  • 82
  • 1
    Hello, I don't know how it's possible but still I think there is nothing to fix. Hint: type `./manage.py migrate photologue --list` and `./manage.py migrate web --list` to see if you are at the latest migrations and what migrations have been applied. HTH – Paolo Feb 06 '13 at 22:06
  • Thanks, I have run the commands and it looks everything is allright. – clime Feb 06 '13 at 22:17

1 Answers1

3

This is just a warning because those tables are managed by south and are ignored on a syncdb.

One solution would be to convert all of your tables to south and always run migrate instead of syncdb. I assume that you could edit manage.py in some way to run the migration instead of returning the message.

If you are no longer using south for those apps delete the migrations directory in the app.

Chris Montanaro
  • 16,948
  • 4
  • 20
  • 29
  • very useful. So I basically can ignore it. I wonder though, how it is possible that photologue is managed by south as I did not call --init for it. But now I am looking at `/usr/lib/python2.7/site-packages/photologue/` and there really IS a directory `migrations/`. However, I can see that all the files inside that directory were created at the time I installed that app so that directory is part of the package. Interesting. – clime Feb 06 '13 at 22:12