Postgres Migration Issue and relation "askbot_thread" does not exist
I am using postgres, but looks like migration fails on auth_user table, and due to that when I run the server I get the following error:
DatabaseError at /questions/
relation "askbot_thread" does not exist
LINE 1: SELECT COUNT(DISTINCT "askbot_thread"."id") FROM "askbot_thr...
^
Request Method: GET
Request URL: http://localhost:8002/questions/
Django Version: 1.4.8
Exception Type: DatabaseError
Exception Value:
relation "askbot_thread" does not exist
LINE 1: SELECT COUNT(DISTINCT "askbot_thread"."id") FROM "askbot_thr...
Here is the result from migration.
$python manage.py syncdb
Please run command
python manage.py collectstatic
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.
With local memory caching and multi-process setup you might intermittently
see outdated content on your site.
current transaction is aborted, commands ignored until end of transaction block
Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table south_migrationhistory
Creating table livesettings_setting
Creating table livesettings_longsetting
Creating table djkombu_queue
Creating table djkombu_message
Creating table followit_followuser
You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'anu'):
E-mail address: auduwage@gmail.com
Password:
Password (again):
Askbot Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Synced:
> django.contrib.auth
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> django.contrib.staticfiles
> django.contrib.admin
> django.contrib.humanize
> django.contrib.sitemaps
> south
> askbot.deps.livesettings
> keyedcache
> django_countries
> djkombu
> followit
> tinymce
Not synced (use migrations):
- longerusername
- askbot.deps.django_authopenid
- robots
- djcelery
- group_messaging
- askbot
(use ./manage.py migrate to migrate these)
[1]+ Done open -a /Applications/Emacs.app $1 settings.py
(vGA_Migration)anu@cmbmac:[~/code/vGA_Migration/gopheranswers]$python manage.py migrate askbot
Please run command
python manage.py collectstatic
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.
With local memory caching and multi-process setup you might intermittently
see outdated content on your site.
relation "askbot_badgedata" does not exist
LINE 1: ..."."slug", "askbot_badgedata"."awarded_count" FROM "askbot_ba...
^
Running migrations for askbot:
- Migrating forwards to 0164_update_postgres_user_search.
> askbot:0001_initial
FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "website" varchar(200) NULL;
The error was: column "website" of relation "auth_user" already exists
FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "about" text NULL;
The error was: column "about" of relation "auth_user" already exists
FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "gold" smallint NOT NULL DEFAULT ...
Comments