On Wed, Sep 15, 2010 at 03:49:37PM +0400, Oleg Broytman wrote:
> On Wed, Sep 15, 2010 at 07:34:06AM -0400, ed...@la... 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/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|