On Tue, Jan 27, 2009 at 02:12:15PM +0100, Davide Alberani wrote:
> What we need is a way to execute a SQL statement like (for MySQL):
>   ALTER TABLE my_info ADD FOREIGN KEY (kind_id) REFERENCES info_type;

   The question was 'how to add', not 'how to change'. SQLObject cannot
change column types, but you can just execute the query:

connection.query('ALTER TABLE my_info ADD FOREIGN KEY (kind_id) REFERENCES
info_type')

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to