Syncdb is producing different databases on different machines.

29 views
Skip to first unread message

Brian McKeever

unread,
Sep 12, 2012, 12:05:07 PM9/12/12
to django...@googlegroups.com
On my development machine, upon freshly creating my postgresql database, when I run syncdb, it creates two invitation tables - invitation_invitationkey and invitation_invitationuser.
On my production server, upon freshly creating my postgresql database, when I run syncdb, it only creates invitation_invitationkey. Why isn't it creating the invitationuser table?

Both machines have the same revision of code.
Both machines are using virtualenvs with the same packages installed including the same version numbers.
Both tables belong to the django-invitation package.

I don't know how to go about debugging this. Any help would be appreciated. Thank you.

Cal Leeming [Simplicity Media Ltd]

unread,
Sep 12, 2012, 1:01:45 PM9/12/12
to django...@googlegroups.com
Are you using any sort of custom db router? (look for DATABASE_ROUTERS in settings).


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ixGlcrj7IhMJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Brian McKeever

unread,
Sep 12, 2012, 1:14:03 PM9/12/12
to django...@googlegroups.com
I am not using any database router.

These are my database settings:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'my database name',
        'USER': 'my admin name',
        'HOST': 'localhost',
        'PASSWORD' : 'my password'

Cal Leeming [Simplicity Media Ltd]

unread,
Sep 12, 2012, 1:22:44 PM9/12/12
to django...@googlegroups.com
lol wtf.

Perhaps the code on the production server isn't fully up to date? Did you check the database to ensure the table definitely doesn't already exist? Did you try running "manage.py sql" on the production server to see if the SQL is printed out for the missing table?

Cal

To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/4PQIkM_FwO0J.

Brian McKeever

unread,
Sep 12, 2012, 1:28:44 PM9/12/12
to django...@googlegroups.com
I actually figured it out.

I created a new virtualenv on my development machine and installed the requirements to it, and from that virtualenv, syncdb fails to install the invitationuser table. I guess whoever is in charge of the django-invitation repository introduced a bug without changing the version number.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages