Database integrity errors when deploying Python(2.7)/Django(1.5) app on Heroku -


these days i'm learning python(2.7)/django(1.5) via developing reddit clone. clone done , works in local environment (db = sqlite3). when try host same thing on heroku (db = postgres), things go awry.

specifically, web app still loads, login, logout , comments part throwing errors (i'm using django-registrations-redux, django-comments , south).

since app online, can go here see error trace:

and files, including requirements.txt etc., can found here: https://github.com/mhb11/unconnectedredditapp

it perplexes me thing continues work locally, not on heroku. i'm assuming may have fudged south migrations. however, i've been deleting heroku app , setting new ones day long. every time run syncdb command on new app, following error after setting super user credentials post django-auth system installation , table creation:

databaseerror: relation "links_userprofile" not exist line 1: ...rofile"."user_id", "links_userprofile"."bio" "links_use... 

i follow heroku run python2.7 manage.py syncdb --migrate (i.e. syncdb , migrate together), time migration doesn't spout error. anyhow, app nevertheless gives db errors pointed out @ start.

i'm thinking should uninstall south in local setup, , use old syncdb everything.

at point, there's ton going wrong heroku deployment, understand may not able give me pinpoint solution. hit me ideas have - i'm open trying everything, because thing has been stuck me since on 48 hrs. help!

note: if end checking out clone (https://salty-ridge-5419.herokuapp.com/), pardon text labels aren't in english.


error trace running syncdb command after doing git push heroku master:

(unconnectedreddit)has@has-virtualbox:~/desktop/uncreddit$ heroku run python2.7 manage.py syncdb running `python2.7 manage.py syncdb` attached terminal... up, run.8792 checking_heroku! on_heroku! syncing... creating tables ... creating table auth_permission creating table auth_group_permissions creating table auth_group creating table auth_user_groups creating table auth_user_user_permissions creating table auth_user creating table django_content_type creating table django_session creating table django_site creating table django_admin_log creating table django_comments creating table django_comment_flags creating table south_migrationhistory  installed django's auth system, means don't have superusers defined. create 1 now? (yes/no): yes username (leave blank use 'u8919'): mhb email address: bhs@bhs.com password:  password (again):  databaseerror: relation "links_userprofile" not exist line 1: ...rofile"."user_id", "links_userprofile"."bio" "links_use... 

the problem solved via running heroku config:set on_heroku=1. in settings.py file, used sqlite3 locally, reverted postgres when on heroku. setting on_heroku 1 before running syncdb, hence, solved problem me.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -