On Mon, Jan 12, 2009 at 05:19:20PM +0100, Timo Schulz wrote:
> I studied the available documentation, but I did not find a hint
> if it is possible to add a foreign key, *after* a table (in the
> database) was created.
> 
> In short, I need something like that:
> "ALTER TABLE foo ADD FOREIGN KEY (dest_id) REFERENCES dest_type"
> 
> Is this possible with SQLObject?

   Foo.sqlmeta.addColumn(
      ForeignKey("DestType", name='dest', default=None),
   changeSchema=True)

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