when i executed this manage.py migrate forum command i got the following error. What does it mean? How can I repair it?

C:\\Python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\db\\__init__.py:19: Dep
recationWarning: settings.DATABASE_* is deprecated; use settings.DATABASES inste
ad.
  DeprecationWarning
C:\\Python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\db\\__init__.py:60: Dep
recationWarning: Short names for ENGINE in database configurations are deprecate
d. Prepend default.ENGINE with 'django.db.backends.'
  DeprecationWarning
C:\\Python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\db\\models\\fields\\subcl
assing.py:80: DeprecationWarning: A Field class whose get_db_prep_lookup method
hasn't been updated to take `connection` and `prepared` arguments.
  new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
C:\\Python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\db\\models\\fields\\subcl
assing.py:80: DeprecationWarning: A Field class whose get_db_prep_value method h
asn't been updated to take `connection` and `prepared` arguments.
  new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
Running migrations for forum:
 - Migrating forwards to 0048_zero_count_tags_fix.
 > forum:0010_auto__del_questionrevision__del_answerrevision__del_field_answer_v
ote_
 ! 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:   = CREATE TABLE `question_revision` (`au
thor_id` integer NOT NULL, `tagnames` varchar(125) NOT NULL, `text` longtext NOT
 NULL, `title` varchar(300) NOT NULL, `question_id` integer NOT NULL, `revised_a
t` datetime NOT NULL, `summary` varchar(300) NOT NULL, `id` integer AUTO_INCREME
NT NOT NULL PRIMARY KEY, `revision` integer UNSIGNED NOT NULL); []
   = CREATE TABLE `answer_revision` (`author_id` integer NOT NULL, `text` longte
xt NOT NULL, `revised_at` datetime NOT NULL, `summary` varchar(300) NOT NULL, `a
nswer_id` integer NOT NULL, `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `r
evision` integer UNSIGNED NOT NULL); []
   = ALTER TABLE `answer` ADD COLUMN `vote_up_count` integer NOT NULL DEFAULT 0;
 []
   = ALTER TABLE `answer` ADD COLUMN `author_id` integer NOT NULL DEFAULT 1; []
   = ALTER TABLE `answer` ADD COLUMN `deleted` bool NOT NULL DEFAULT False; []
   = ALTER TABLE `answer` ADD COLUMN `question_id` integer NOT NULL DEFAULT 1; [
]
   = ALTER TABLE `answer` ADD COLUMN `html` longtext NOT NULL; []
   = ALTER TABLE `answer` ADD COLUMN `offensive_flag_count` smallint NOT NULL DE
FAULT 0; []
   = ALTER TABLE `answer` ADD COLUMN `deleted_by_id` integer NULL; []
   = ALTER TABLE `answer` ADD COLUMN `comment_count` integer UNSIGNED NOT NULL D
EFAULT 0; []
   = ALTER TABLE `answer` ADD COLUMN `score` integer NOT NULL DEFAULT 0; []
   = ALTER TABLE `answer` ADD COLUMN `vote_down_count` integer NOT NULL DEFAULT
0; []
   = ALTER TABLE `answer` ADD COLUMN `added_at` datetime NOT NULL DEFAULT '2011-
04-27 16:42:21.590000'; []
   = ALTER TABLE `answer` ADD COLUMN `last_edited_by_id` integer NULL; []
   = ALTER TABLE `answer` ADD COLUMN `deleted_at` datetime NULL; []
   = ALTER TABLE `answer` ADD COLUMN `id` integer AUTO_INCREMENT NOT NULL PRIMAR
Y KEY DEFAULT 1; []
   = ALTER TABLE `answer` ADD COLUMN `last_edited_at` datetime NULL; []
   = ALTER TABLE `question` ADD COLUMN `vote_up_count` integer NOT NULL DEFAULT
0; []
   = ALTER TABLE `question` ADD COLUMN `offensive_flag_count` smallint NOT NULL
DEFAULT 0; []
   = ALTER TABLE `question` ADD COLUMN `summary` varchar(180) NOT NULL DEFAULT 1
; []
   = ALTER TABLE `question` ADD COLUMN `id` integer AUTO_INCREMENT NOT NULL PRIM
ARY KEY DEFAULT 1; []
   = ALTER TABLE `question` ADD COLUMN `deleted_at` datetime NULL; []
   = ALTER TABLE `question` ADD COLUMN `score` integer NOT NULL DEFAULT 0; []
   = ALTER TABLE `question` ADD COLUMN `author_id` integer NOT NULL DEFAULT 1; [
]
   = ALTER TABLE `question` ADD COLUMN `comment_count` integer UNSIGNED NOT NULL
 DEFAULT 0; []
   = ALTER TABLE `question` ADD COLUMN `html` longtext NOT NULL; []
   = ALTER TABLE `question` ADD COLUMN `vote_down_count` integer NOT NULL DEFAUL
T 0; []
   = ALTER TABLE `question` ADD COLUMN `last_edited_by_id` integer NULL; []
   = ALTER TABLE `question` ADD COLUMN `deleted` bool NOT NULL DEFAULT False; []

= ALTER TABLE `question` ADD COLUMN `tagnames` varchar(125) NOT NULL DEFAULT
1; []
   = ALTER TABLE `question` ADD COLUMN `title` varchar(300) NOT NULL DEFAULT 1;
[]
   = ALTER TABLE `question` ADD COLUMN `added_at` datetime NOT NULL DEFAULT '201
1-04-27 16:42:21.590000'; []
   = ALTER TABLE `question` ADD COLUMN `deleted_by_id` integer NULL; []
   = ALTER TABLE `question` ADD COLUMN `last_edited_at` datetime NULL; []
   = CREATE TABLE `question_followed_by` (`id` integer AUTO_INCREMENT NOT NULL P
RIMARY KEY, `question_id` integer NOT NULL, `user_id` integer NOT NULL); []
   = ALTER TABLE `question_followed_by` ADD CONSTRAINT `question_followed_by_que
stion_id_2ee2b8ae_uniq` UNIQUE (`question_id`, `user_id`) []
   = CREATE TABLE `question_tags` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY
KEY, `question_id` integer NOT NULL, `tag_id` integer NOT NULL); []
   = ALTER TABLE `question_tags` ADD CONSTRAINT `question_tags_question_id_37b2f
428_uniq` UNIQUE (`question_id`, `tag_id`) []

! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS.
 ! NOTE: The error which caused the migration to fail is further up.
Traceback (most recent call last):
  File "C:\\OSQA\\manage.py", line 13, in <module>
    execute_manager(settings)
  File "c:\\python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\core\\managemen
t\\__init__.py", line 438, in execute_manager
    utility.execute()
  File "c:\\python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\core\\managemen
t\\__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "c:\\python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\core\\managemen
t\\base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "c:\\python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\core\\managemen
t\\base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\management\\com
mands\\migrate.py", line 105, in handle
    ignore_ghosts = ignore_ghosts,
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\migration\\__in
it__.py", line 191, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\migration\\migr
ators.py", line 221, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, datab
ase)
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\migration\\migr
ators.py", line 292, in migrate_many
    result = self.migrate(migration, database)
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\migration\\migr
ators.py", line 125, in migrate
    result = self.run(migration)
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\migration\\migr
ators.py", line 99, in run
    return self.run_migration(migration)
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\migration\\migr
ators.py", line 81, in run_migration
    migration_function()
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\migration\\migr
ators.py", line 57, in <lambda>
    return (lambda: direction(orm))
  File "C:\\OSQA\\forum\\migrations\\0010_auto__del_questionrevision__del_answerrevi
sion__del_field_answer_vote_.py", line 12, in forwards
    db.delete_table(u'question_revision')
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\db\\generic.py"
, line 249, in delete_table
    self.execute('DROP TABLE %s CASCADE;' % params)
  File "c:\\python26\\lib\\site-packages\\south-0.7.3-py2.6.egg\\south\\db\\generic.py"
, line 150, in execute
    cursor.execute(sql, params)
  File "C:\\Python26\\lib\\site-packages\\django-1.3-py2.6.egg\\django\\db\\backends\\my
sql\\base.py", line 86, in execute
    return self.cursor.execute(query, args)
  File "C:\\Python26\\lib\\site-packages\\pymysql-0.3-py2.6.egg\\pymysql\\cursors.py",
 line 102, in execute
  File "C:\\Python26\\lib\\site-packages\\pymysql-0.3-py2.6.egg\\pymysql\\connections.
py", line 175, in defaulterrorhandler
django.db.utils.DatabaseError: (1051, u"Unknown table 'question_revision'")

asked 27 Apr '11, 07:06

Sai%20Krishna's gravatar image

Sai Krishna
1112
accept rate: 0%

edited 27 Apr '11, 07:33

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674


typing this manage.py migrate forum --fake command solved my problem

link

answered 27 Apr '11, 09:08

Sai%20Krishna's gravatar image

Sai Krishna
1112
accept rate: 0%

This might solve the immediate problem, but if the tables and/or columns are not created in the DB you need to add them manually.

(28 Apr '11, 13:29) JonathanB

I managed to get rid of the deprecation warnings by using Django 1.2.5 instead of 1.3 [I was having an overall issue with syncdb].

link

answered 27 Apr '11, 09:28

Thang's gravatar image

Thang
11
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×37

Asked: 27 Apr '11, 07:06

Seen: 1,211 times

Last updated: 28 Apr '11, 13:29

powered by OSQA