dharmafly / tasket

A micro-volunteering app, for crowd-managed tasks.
http://dharmafly.com/tasket
26 stars 3 forks source link

Database error, due to new archive hub functionality? #388

Closed orangespaceman closed 13 years ago

orangespaceman commented 13 years ago

Do we need to manually run a database update due to the changes made when adding the archive hub functionality?

Server is currently returning 500 errors on certain API calls when trying to view the master branch, for example -

http://127.0.0.1:8000/hubs/ DatabaseError at /hubs/ "no such column: tasks_hub.archived_time"

Request Method:GET Request URL:http://127.0.0.1:8000/hubs/ Django Version:1.3 Exception Type:DatabaseError Exception Value:no such column: tasks_hub.archived_time Exception Location: /Users/pete/Development/web/clients/dharmafly/tasket/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py in execute, line 234 Python Executable: /Users/pete/Development/web/clients/dharmafly/tasket/bin/python Python Version: 2.6.1

(Alternatively this may be due to switching between development and master branches, launching the site (and the database) from one, then switching to the other?)

premasagar commented 13 years ago

Fix:

python manage.py syncdb
python manage.py migrate

Additional, for db's established before South migration setup:

python manage.py dbshell
> ALTER TABLE tasks_hub ADD COLUMN archived_time timestamp with time zone;
> ALTER TABLE tasks_hub ADD COLUMN archived_by_id integer;