#23009: migrations may generate too long identifiers for the database
----------------------------+----------------------
Reporter: twiggers | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------
Similar to #1820, I am getting 'too long identifier' errors when using
Django
1.7rc1 migrations.
See this trace:
{{{
[snip]
Applying gamemaker.0001_initial...Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/core/management/__init__.py", line 385, in
execute_from_command_line
utility.execute()
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/core/management/base.py", line 337, in execute
output = self.handle(*args, **options)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/core/management/commands/migrate.py", line 160, in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/migrations/executor.py", line 62, in migrate
self.apply_migration(migration, fake=fake)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/migrations/executor.py", line 96, in apply_migration
migration.apply(project_state, schema_editor)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/backends/schema.py", line 82, in __exit__
self.execute(sql)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/backends/schema.py", line 98, in execute
cursor.execute(sql, params)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/backends/utils.py", line 81, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/django/db/backends/mysql/base.py", line 128, in execute
return self.cursor.execute(query, args)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/thom/git/cachegame/env/lib/python2.7/site-
packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.OperationalError: (1059, "Identifier name
'gamepartrequirement_id_refs_gamepartrequirement_id_73910b1f79e0e715' is
too long")
}}}
When I `rm -r gamemaker/migrations`, everything goes well when I run
./migrate.py syncdb.
I'm using MySQL-python 1.2.5.
--
Ticket URL: <https://code.djangoproject.com/ticket/23009>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.89bd7485c8e27c3a1a6bc73af2c0ca65%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.