Ask Your Question
0

Fresh Installation migration errors

asked 2014-02-04 04:34:15 -0600

umang gravatar image

TechStack: Django==1.4, askbot==0.7.49, (PostgreSQL) 9.1.9, psycopg2==2.4.5

When i try to start a fresh installation on a fresh DB the migrations are failing. It shows fatal error with alter table commands failing and migration halts in the middle.

Steps to reproduce: 1) Create a db in postgres: Create database askbot_test; 2) Create a virtualenv askbot 3) Install askbot and django 4) Configure the DB settings in the local django project created. 5) Run commands python manage.py syncdb ( successful ) python manage.py migrate askbot ( fails )

Error Stacktrace:

Running migrations for askbot: - Migrating forwards to 0170_auto__add_field_group_read_only.

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 "hide_ignored_questions" boolean NOT NULL DEFAULT False; The error was: column "hide_ignored_questions" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "gold" smallint NOT NULL DEFAULT 0; The error was: column "gold" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "email_isvalid" boolean NOT NULL DEFAULT False; The error was: column "email_isvalid" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "real_name" varchar(100) NULL; The error was: column "real_name" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "location" varchar(100) NULL; The error was: column "location" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "email_key" varchar(32) NULL; The error was: column "email_key" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "date_of_birth" date NULL; The error was: column "date_of_birth" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "reputation" integer CHECK ("reputation" >= 0) NOT NULL DEFAULT 1; The error was: column "reputation" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "gravatar" varchar(32) NULL; The error was: column "gravatar" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "bronze" smallint NOT NULL DEFAULT 0; The error was: column "bronze" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "tag_filter_setting" varchar(16) NOT NULL DEFAULT 'ignored'; The error was: column "tag_filter_setting" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "last_seen" timestamp with time zone NOT NULL DEFAULT '2014-02-04 15:45:25.071122'; The error was: column "last_seen" of relation "auth_user" already exists

FATAL ERROR - The following SQL query failed ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-11 11:19:04 -0600

alci gravatar image

I just went through the very same process, with same output... Reading this QA site, I came accross this command,

python manage.py syncdb --migrate --noinput

which seems to work better than the

python manage.py migrate askbot python manage.py migrate django_authopenid

found in the installation doc.

It seemed to work for me (although I'm stuck later, not being able to login, which is another problem).

edit flag offensive delete link more

Comments

Using your command I get the same error, but on the `vote` table. Any hint?

ProfGra gravatar imageProfGra ( 2014-07-12 16:52:23 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-02-04 04:34:15 -0600

Seen: 520 times

Last updated: Feb 11 '14