Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 892465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:03:38+00:00 2026-05-15T14:03:38+00:00

I have new to python and django I am creating poll application and in

  • 0

I have new to python and django I am creating poll application and in that application after creating models poll and choice using “South”. I want to changer the length of question field from 200 to 300 but I am not able to achieve it even using south as well.

I have run python manage.py schemamigration polls –initial command to create migration file then I make change in poll question field that is (question = models.CharField(max_length=250)) change max_length from 200 to 250.

and the again run python manage.py schemamigration polls –auto this will generate new migration file.

after that all stuff I run python manage.py migrate polls and it shows following error :

C:\Python26\lib\site-packages\MySQLdb\__init__.py:34: DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet
Running migrations for polls:
 - Migrating forwards to 0003_auto__chg_field_poll_question.
 > polls:0003_auto__chg_field_poll_question
 ! 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 `polls_poll` ; []
   = ALTER TABLE `polls_poll` MODIFY `question` varchar(200) NOT NULL;; []
   = ALTER TABLE `polls_poll` ALTER COLUMN `question` DROP DEFAULT; []

 ! 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 "manage.py", line 11, in <module>
    execute_manager(settings)
  File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line
362, in execute_manager
    utility.execute()
  File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line
303, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python26\lib\site-packages\django\core\management\base.py", line 195,
 in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python26\lib\site-packages\django\core\management\base.py", line 222,
 in execute
    output = self.handle(*args, **options)
  File "C:\Python26\lib\site-packages\south\management\commands\migrate.py", lin
e 109, in handle
    ignore_ghosts = ignore_ghosts,
  File "C:\Python26\lib\site-packages\south\migration\__init__.py", line 202, in
 migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "C:\Python26\lib\site-packages\south\migration\migrators.py", line 220, i
n migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, datab
ase)
  File "C:\Python26\lib\site-packages\south\migration\migrators.py", line 291, i
n migrate_many
    result = self.migrate(migration, database)
  File "C:\Python26\lib\site-packages\south\migration\migrators.py", line 125, i
n migrate
    result = self.run(migration)
  File "C:\Python26\lib\site-packages\south\migration\migrators.py", line 99, in
 run
    return self.run_migration(migration)
  File "C:\Python26\lib\site-packages\south\migration\migrators.py", line 81, in
 run_migration
    migration_function()
  File "C:\Python26\lib\site-packages\south\migration\migrators.py", line 57, in
 <lambda>
    return (lambda: direction(orm))
  File "C:\mysite\..\mysite\polls\migrations\0003_auto__chg_field_poll_question.
py", line 12, in forwards
    db.alter_column('polls_poll', 'question', self.gf('django.db.models.fields.C
harField')(max_length=250))
  File "C:\Python26\lib\site-packages\south\db\generic.py", line 330, in alter_c
olumn
    self.delete_foreign_key(table_name, name)
  File "C:\Python26\lib\site-packages\south\db\generic.py", line 588, in delete_
foreign_key
    constraints = list(self._constraints_affecting_columns(table_name, [column],
 "FOREIGN KEY"))
  File "C:\Python26\lib\site-packages\south\db\mysql.py", line 140, in _constrai
nts_affecting_columns
    """, [db_name, table_name, type])
  File "C:\Python26\lib\site-packages\south\db\generic.py", line 134, in execute

    cursor.execute(sql, params)
  File "C:\Python26\lib\site-packages\django\db\backends\util.py", line 19, in e
xecute
    return self.cursor.execute(sql, params)
  File "C:\Python26\lib\site-packages\django\db\backends\mysql\base.py", line 84
, in execute
    return self.cursor.execute(query, args)
  File "C:\Python26\lib\site-packages\MySQLdb\cursors.py", line 168, in execute
    if not self._defer_warnings: self._warning_check()
  File "C:\Python26\lib\site-packages\MySQLdb\cursors.py", line 82, in _warning_
check
    warn(w[-1], self.Warning, 3)
_mysql_exceptions.Warning: Can't find file: 'slow_log' (errno: 2)

Please help me

0003 Look like :

class Migration(SchemaMigration):

def forwards(self, orm):

    # Changing field 'Poll.question'
    db.alter_column('polls_poll', 'question', self.gf('django.db.models.fields.CharField')(max_length=250))


def backwards(self, orm):

    # Changing field 'Poll.question'
    db.alter_column('polls_poll', 'question', self.gf('django.db.models.fields.CharField')(max_length=200))

Ansh J

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:03:39+00:00Added an answer on May 15, 2026 at 2:03 pm

    To be able to answer this question with any certainty you’ll need to show migrations 0002 and 0003…

    However, it seems to me the resulting exception is simply a problem with MySQL (it cannot find its ‘slow log’) that creates a warning that is propagated to south, which trips over it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 483k
  • Answers 483k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer background is a shorthand declaration that sets a number of… May 16, 2026 at 6:56 am
  • Editorial Team
    Editorial Team added an answer Looks like you had the variables swapped in this line:… May 16, 2026 at 6:56 am
  • Editorial Team
    Editorial Team added an answer Try: $( 'span.srch-URL a[href*="TestForm.aspx"]' ) And if you're unsure on… May 16, 2026 at 6:56 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.