On Wed, Sep 15, 2010 at 03:49:37PM +0400, Oleg Broytman wrote:
> On Wed, Sep 15, 2010 at 07:34:06AM -0400, [email protected] wrote:
> > 1/Query : ALTER TABLE user_phonelists ADD UNIQUE unique (user_id,
> > phonelist_id)
>
> What version of SQLObject and on what backend do you use it?
Aha, I see - it's MySQL. Well, the syntax is
ALTER TABLE tname ADD UNIQUE [index_name] (index_col_name,...)
The problem is the name of the index - 'unique'. Try to rename it:
user_phonelist_unique = index.DatabaseIndex(user, phonelist, unique=True)
Oleg.
--
Oleg Broytman http://phd.pp.ru/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss