Skip to content

Instantly share code, notes, and snippets.

@ibrahima
Created Apr 9, 2012
Embed
What would you like to do?
Errors upon trying to install askbot with python 2.7.2, postgresql 9.1.3, ubuntu 11.10, psycopg2 2.4.5
$ ./manage.py migrate askbot
************************
* *
* Askbot self-test *
* *
************************
Please run command
python manage.py collectstatic
relation "askbot_badgedata" does not exist
LINE 1: ..."."slug", "askbot_badgedata"."awarded_count" FROM "askbot_ba...
^
Running migrations for askbot:
- Migrating forwards to 0113_auto__add_field_thread_added_at__add_field_thread_score__add_field_rep.
> askbot:0001_initial
FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "website" varchar(200) NOT 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 NOT 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) NOT 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) NOT 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) NOT 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 '2012-04-08 20:59:42.392964';
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 COLUMN "questions_per_page" smallint NOT NULL DEFAULT 10;
The error was: column "questions_per_page" of relation "auth_user" already exists
> askbot:0002_auto__add_field_answer_text__chg_field_answer_html__add_field_question
> askbot:0003_copy_denorm_text_record_to_posts_for_fulltext_search
- Migration 'askbot:0003_copy_denorm_text_record_to_posts_for_fulltext_search' is marked for no-dry-run.
> askbot:0004_install_full_text_indexes_for_mysql
- Migration 'askbot:0004_install_full_text_indexes_for_mysql' is marked for no-dry-run.
> askbot:0005_install_badges
- Migration 'askbot:0005_install_badges' is marked for no-dry-run.
adding new badge Disciplined
adding new badge Peer Pressure
adding new badge Nice answer
adding new badge Nice Question
adding new badge Pundit
adding new badge Popular Question
adding new badge Citizen patrol
adding new badge Cleanup
adding new badge Critic
adding new badge Editor
adding new badge Organizer
adding new badge Scholar
adding new badge Student
adding new badge Supporter
adding new badge Teacher
adding new badge Autobiographer
adding new badge Self-Learner
adding new badge Great Answer
adding new badge Great Question
adding new badge Stellar Question
adding new badge Famous question
adding new badge Alpha
adding new badge Good Answer
adding new badge Good Question
adding new badge Favorite Question
adding new badge Civic duty
adding new badge Strunk & White
adding new badge Generalist
adding new badge Expert
adding new badge Yearling
adding new badge Notable Question
adding new badge Enlightened
adding new badge Beta
adding new badge Guru
adding new badge Necromancer
adding new badge Taxonomist
> askbot:0006_add_subscription_setting_for_comments_and_mentions
- Migration 'askbot:0006_add_subscription_setting_for_comments_and_mentions' is marked for no-dry-run.
**************
Adding subscription on comment responses and name mentions for each user.
frequency will be automatically set to the most frequent selection
that user made for any other types of subscriptions
added 'no email' subscription for ibrahim (1)
> askbot:0007_install_mentions_model
> askbot:0008_add_html_field_to_comments
> askbot:0009_calculate_html_field_for_comments
- Migration 'askbot:0009_calculate_html_field_for_comments' is marked for no-dry-run.
> askbot:0010_add_receiving_user_to_activity_model
> askbot:0011_merge_mentions_into_activity
- Migration 'askbot:0011_merge_mentions_into_activity' is marked for no-dry-run.
> askbot:0012_delete_some_unused_models
> askbot:0013_add_response_count__to_user
FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "response_count" integer NOT NULL DEFAULT 0;
The error was: column "response_count" of relation "auth_user" already exists
probably already have column User.response_count
> askbot:0014_rename_schema_from_forum_to_askbot
FATAL ERROR - The following SQL query failed: ALTER TABLE "forum_anonymousanswer" RENAME TO "askbot_anonymousanswer";
The error was: relation "forum_anonymousanswer" does not exist
> askbot:0015_rename_forum_contenttypes_to_askbot
- Migration 'askbot:0015_rename_forum_contenttypes_to_askbot' is marked for no-dry-run.
> askbot:0016_auto__del_validationhash
> askbot:0017_add_group__moderators
- Migration 'askbot:0017_add_group__moderators' is marked for no-dry-run.
> askbot:0018_add___status__field_to_user_model
FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "status" varchar(2) NOT NULL DEFAULT 'w';
The error was: column "status" of relation "auth_user" already exists
> askbot:0019_populate_user_status_field
- Migration 'askbot:0019_populate_user_status_field' is marked for no-dry-run.
> askbot:0020_auto__add_field_repute_comment__chg_field_repute_question
> askbot:0021_auto__add_field_comment_score
> askbot:0022_init_postgresql_full_text_search
- Migration 'askbot:0022_init_postgresql_full_text_search' is marked for no-dry-run.
> askbot:0023_auto__add_activityauditstatus
> askbot:0024_add_recipients_m2m_to_activity_and_denorm_question_on_activity
- Migration 'askbot:0024_add_recipients_m2m_to_activity_and_denorm_question_on_activity' is marked for no-dry-run.
> askbot:0025_transfer_flagged_items_to_activity
- Migration 'askbot:0025_transfer_flagged_items_to_activity' is marked for no-dry-run.
> askbot:0026_add_seen_and_new_response_counts_to_user
FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "new_response_count" integer NOT NULL DEFAULT 0;
The error was: column "new_response_count" of relation "auth_user" already exists
> askbot:0027_populate_new_response_counts
- Migration 'askbot:0027_populate_new_response_counts' is marked for no-dry-run.
> askbot:0028_delete_response_count_column_from_user_model
> askbot:0029_auto__del_flaggeditem
> askbot:0030_rename_badge_to_badgedata
> askbot:0031_synchronize_badge_slug_with_name
- Migration 'askbot:0031_synchronize_badge_slug_with_name' is marked for no-dry-run.
> askbot:0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d
FATAL ERROR - The following SQL query failed: ALTER TABLE "askbot_badgedata" ADD CONSTRAINT "askbot_badgedata_a951d5d6" UNIQUE ("slug")
The error was: relation "askbot_badgedata_a951d5d6" already exists
! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
! schema-altering statements in transactions, we have had
! to leave it in an interim state between migrations.
! You *might* be able to recover with: = ALTER TABLE "askbot_badgedata" ADD COLUMN "multiple" boolean NOT NULL DEFAULT False; []
- no dry run output for alter_column() due to dynamic DDL, sorry
= ALTER TABLE "askbot_badgedata" ADD COLUMN "description" varchar(300) NOT NULL DEFAULT ''; []
- no dry run output for alter_column() due to dynamic DDL, sorry
= ALTER TABLE "askbot_badgedata" ADD COLUMN "type" smallint NOT NULL DEFAULT 3; []
- no dry run output for alter_column() due to dynamic DDL, sorry
= ALTER TABLE "askbot_badgedata" ADD COLUMN "name" varchar(50) NOT NULL DEFAULT ''; []
- no dry run output for alter_column() due to dynamic DDL, sorry
- no dry run output for alter_column() due to dynamic DDL, sorry
- no dry run output for delete_unique_column() due to dynamic DDL, sorry
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS (one that supports DDL transactions)
! NOTE: The error which caused the migration to fail is further up.
Error in migration: askbot:0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/south/management/commands/migrate.py", line 107, in handle
ignore_ghosts = ignore_ghosts,
File "/usr/local/lib/python2.7/dist-packages/south/migration/__init__.py", line 219, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/usr/local/lib/python2.7/dist-packages/south/migration/migrators.py", line 235, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/usr/local/lib/python2.7/dist-packages/south/migration/migrators.py", line 310, in migrate_many
result = self.migrate(migration, database)
File "/usr/local/lib/python2.7/dist-packages/south/migration/migrators.py", line 133, in migrate
result = self.run(migration)
File "/usr/local/lib/python2.7/dist-packages/south/migration/migrators.py", line 107, in run
return self.run_migration(migration)
File "/usr/local/lib/python2.7/dist-packages/south/migration/migrators.py", line 81, in run_migration
migration_function()
File "/usr/local/lib/python2.7/dist-packages/south/migration/migrators.py", line 57, in <lambda>
return (lambda: direction(orm))
File "/usr/local/lib/python2.7/dist-packages/askbot/migrations/0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d.py", line 30, in forwards
db.create_unique('askbot_badgedata', ['slug'])
File "/usr/local/lib/python2.7/dist-packages/south/db/generic.py", line 46, in _cache_clear
return func(self, table, *args, **opts)
File "/usr/local/lib/python2.7/dist-packages/south/db/generic.py", line 612, in create_unique
cols,
File "/usr/local/lib/python2.7/dist-packages/south/db/generic.py", line 264, in execute
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
django.db.utils.DatabaseError: relation "askbot_badgedata_a951d5d6" already exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment