[sqlalchemy] Re: utf8 encoding issue in MySQL

2009-01-16 Thread KevinTran
Thanks you. It worked. On Jan 15, 1:58 pm, Michael Bayer wrote: > I think this is configurable on the MySQL server directly, i.e.   > default charset, otherwise you can set it via **{'mysql_DEFAULT   > CHARSET':'utf8'} in your Table def. > > On Jan 15

[sqlalchemy] Re: creating indexes in MySQL

2009-01-16 Thread KevinTran
Thanks so much. I am new to this whole SQL/database thing and this is the exact function I was looking for. On Jan 15, 1:59 pm, Michael Bayer wrote: > try using the DDL() construct instead.   I dont think Index() supports   > that syntax. > > On Jan 15, 2009, at 3:10 PM, Kev

[sqlalchemy] utf8 encoding issue in MySQL

2009-01-15 Thread KevinTran
I have the table definition below: urls = Table('url', meta, Column('id', Integer(11), primary_key=True), Column('address', Unicode(1024)), Column('content', Unicode(255)), mysql_engine='InnoDB' ) This will make the SQL below: CREATE TABLE `url` ( `id` int(11) NOT NULL AUTO_IN

[sqlalchemy] creating indexes in MySQL

2009-01-15 Thread KevinTran
I have a quick question. I am trying to make an index for my table in MySQL. I have the line below: Index('index_table_on_field', table.c.field) I want to specify a length as in the SQL: KEY `index_table_on_field` (`field`(255)) Where do I enter the value 255 in the SQLAlchemy syntax? Thank