pennersr / django-allauth

Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
https://allauth.org
MIT License
9.51k stars 3.03k forks source link

Weird behaviour running syncdb #409

Closed pauloneves closed 11 years ago

pauloneves commented 11 years ago

After the installation and configuration, I've run ./manage.py syncdb and stumbled in a weird behaviour. Some models were synced and others not:

Synced:

django.contrib.auth django.contrib.contenttypes django.contrib.messages django.contrib.sessions django.contrib.staticfiles django.contrib.sites south debug_toolbar allauth allauth.account allauth.socialaccount.providers.google allauth.socialaccount.providers.persona avatar django.contrib.admin django.contrib.admindocs

Not synced (use migrations):

I didn't understand why the last two models weren't created. Here is the output of the tables in my database:

mysql> show tables like '%accou%'; +--------------------------------+ | Tables_in_sambachoro (%accou%) | +--------------------------------+ | account_emailaddress | | account_emailconfirmation | | socialaccount_socialaccount | | socialaccount_socialapp | | socialaccount_socialapp_sites | | socialaccount_socialtoken | +--------------------------------+

Is it correct?

pennersr commented 11 years ago

As soon as you activate South in your project (as you seem to have done), syncdb only creates the tables for apps that are not managed by South. To create the other tables, use:

python manage.py migrate

To create all (when starting afresh) use:

python manage.py syncdb --all