Hello All! I'm facing the well known problem of maintaining constraints, when using sqlalchemy (v0.9.8), alembic (v0.7.4) and MySQL (v5.5.41) on Ubuntu (v14.04.2).
I'm talking specifically about these two links: o http://docs.sqlalchemy.org/en/rel_0_9/core/constraints.html#constraint-naming-conventions o http://alembic.readthedocs.org/en/latest/naming.html The suggested naming conventions, do not work for me with MySQL and I was hoping to hear how others are dealing with the issues. The main problem is the following: o MySQL's 64 character limit on constrain names: https://bugs.mysql.com/bug.php?id=13942. I hit it when using the recommended foreign key naming convention: fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s But, I also have these issues: o The fact the primary constraint in MySQL *is always* called PRIMARY, regardless of what you specify. o I also seem to be hitting a bug in sqlalchemy similar to this one: https://bitbucket.org/zzzeek/sqlalchemy/issue/3067/naming-convention-exception-for-boolean. I get this error: InvalidRequestError: Naming convention including %(constraint_name)s token requires that constraint is explicitly named. All this is compounded by the fact that we're also trying to support Postgres (which works very well by way), so we can't only cater to MySQL's nuisances. The bug I'm trying to fix is in a future OpenStack component: https://bugs.launchpad.net/barbican/+bug/1415869 Any suggestion or shared experiences about how to deal with any of these issues is welcome! -- Giovanni -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
