{{{
_mysql_exceptions.Warning: TIME/TIMESTAMP/DATETIME columns of old format
have been upgraded to the new format.
}}}
Unfortunately this causes an exception in MySQLdb, which is not caught, so
the script exits and the rest of the migration is not run, although the
changes to the time related fields are made. This could need a fair amount
of work to clean up if it happens during a complex migration.
{{{
File "./manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 385, in
execute_from_command_line
utility.execute()
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/core/management/commands/migrate.py", line 161, in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/migrations/executor.py", line 68, in migrate
self.apply_migration(migration, fake=fake)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/migrations/executor.py", line 102, in apply_migration
migration.apply(project_state, schema_editor)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/migrations/migration.py", line 108, in apply
operation.database_forwards(self.app_label, schema_editor,
project_state, new_state)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/migrations/operations/fields.py", line 37, in
database_forwards
field,
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/backends/mysql/schema.py", line 42, in add_field
super(DatabaseSchemaEditor, self).add_field(model, field)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/backends/schema.py", line 388, in add_field
self.execute(sql, params)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/backends/schema.py", line 111, in execute
cursor.execute(sql, params)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/backends/utils.py", line 81, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/django/db/backends/mysql/base.py", line 129, in execute
return self.cursor.execute(query, args)
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/MySQLdb/cursors.py", line 207, in execute
if not self._defer_warnings: self._warning_check()
File "[path-to-virtualenv]/local/lib/python2.7/site-
packages/MySQLdb/cursors.py", line 117, in _warning_check
warn(w[-1], self.Warning, 3)
_mysql_exceptions.Warning: TIME/TIMESTAMP/DATETIME columns of old format
have been upgraded to the new format.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25014>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Are you on Django 1.7? In Django 1.8, MySQL warnings are no longer
promoted to errors (#23871) so I think this should be fixed there.
--
Ticket URL: <https://code.djangoproject.com/ticket/25014#comment:1>
* status: new => closed
* resolution: => duplicate
Comment:
Iops, it looks like it is fixed in 1.8. My mistake. I did not find that
ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/25014#comment:2>