Hi folks, I've been googling and cargo culting to no avail here, hope
someone can help.
I'm trying to get an app running on MySQL on OS X, that was running fine on
MySQL on Linux.

The issue is I have some large composite primarky keys:

class VarTrigger(Base):
    "assoc table that associates actions when a var is set"
    __tablename__ = "var_trigger"
    # actual primary key is var_id, p_value
    var_id = Column(Integer, ForeignKey("var.id"), nullable=True,
primary_key=True)
    p_value = Column( String(255), primary_key=True, nullable=False )
    ...

When I try to create the tables I'm getting the following:

qlalchemy.exc.OperationalError: (OperationalError) (1709, 'Index column
size too large. The maximum column size is 767 bytes.') '\nCREATE TABLE
var_description (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tvar_id
INTEGER, \n\tp_value VARCHAR(256) NOT NULL, \n\tlook TEXT, \n\tlist TEXT,
\n\tsearch TEXT, \n\tPRIMARY KEY (id), \n\tUNIQUE (var_id, p_value),
\n\tFOREIGN KEY(var_id) REFERENCES var (id)\n)\n\n' ()

I've been trying out things like changing character collation and so one
with no luck. Anyone know what should be done about this? I tried making a
surrogate primary key and just declaring a unique constraint on the two
columns and got the same message.

thanks
Iain

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to