Ask Your Question
1

Switching to Postgres but Migration issues.

asked 2013-10-13 17:24:28 -0600

SocialQA gravatar image

I have been developing against MySQL. After researching and following the Forum I realized its better to switch to Postgres before we put this on a server. I decided to do a fresh installation from my branch and setup against postgres but ended up getting following errors:

$python manage.py migrate askbot
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 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 "last_seen" timestamp with time zone NOT NULL DEFAULT '2013-10-13 17:17:56.687763';
The error was: column "last_seen" of relation "auth_user" already exists

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

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-11-25 14:31:47 -0600

Evgeny gravatar image

These issues are hopefully fixed now in the repository. Tested with Postgres, Sqlite3 and Mysql/InnoDB.

edit flag offensive delete link more

Comments

I am still having the issue. Any chance you can point me towards to the commit that because I want to confirm if I have have the fix that you guy have put. Thanks,

SocialQA gravatar imageSocialQA ( 2013-11-27 09:06:16 -0600 )edit
1

answered 2013-11-08 09:37:16 -0600

VikasJ gravatar image

did you try deleting database and recreating it again.... worked for me.

edit flag offensive delete link more

Comments

deleting and re-creating didn't work for me.

SocialQA gravatar imageSocialQA ( 2013-11-27 09:06:52 -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

1 follower

Stats

Asked: 2013-10-13 17:24:28 -0600

Seen: 826 times

Last updated: Nov 25 '13