the first hit on google for this is a stack overflow answer that points to the relevant details for this message:
http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes the size of the index is being impacted by the character encoding in use; see the links above for more details/workarounds. On Oct 8, 2014, at 1:32 PM, Lance Blais <la...@eventmobi.com> wrote: > I have an existing Flask based Python 3.3 project and I'm trying to set it up > to use Alembic. > > I've followed the instructions and modified env.py as directed in various > places. When I run `alembic revision --autogenerate -m 'test' `, I get a > proper list of all my models. > > After that, I run `alembic upgrade head` and I get the following MySQL error: > > sqlalchemy.exc.InternalError: (InternalError) (1071, 'Specified key was too > long; max key length is 767 bytes') b'\nCREATE TABLE hashed_links (\n\t`key` > VARCHAR(256) NOT NULL, \n\tlink TEXT NOT NULL, \n\tPRIMARY KEY > (`key`)\n)\n\n' () > > Can anyone tell me if there's something I've misconfigured or what to do to > look deeper into this issue? > > The database is MySQL 5.6, the default engine is InnoDB and I've ensured that > all permissions are correctly set. The database itself is fresh (drop > database; create database) whenever I try something new, so I'm hoping that > gets all the trivial debug steps out of the way. > > Thank you! > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy-alembic" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy-alembic+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.