Syncdb is producing different databases on different machines.

閲覧: 29 回
最初の未読メッセージにスキップ

Brian McKeever

未読、
2012/09/12 12:05:072012/09/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]

未読、
2012/09/12 13:01:452012/09/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

未読、
2012/09/12 13:14:032012/09/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]

未読、
2012/09/12 13:22:442012/09/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

未読、
2012/09/12 13:28:442012/09/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.
全員に返信
投稿者に返信
転送
メッセージは削除されました
新着メール 0 件