On Jul 5, 2010, at 10:13 AM, Chris Withers wrote:

> Michael Bayer wrote:
>> why don't you create a ForeignKeyConstraint that only has the "name" field ? 
>>   DropConstraint doesn't need anything more than just the name.
> 
> 'cos I don't know what I'm doing ;-)
> 
>> also here, again we only need a name. Make yourself a fake table:
>> t = Table(table_name, metadata, Column('dummy', Integer))
> 
> Why the column?

I thought in case Table would complain.  guess not.
> 
> Passes tests with MySQL and SQLite. I'd still love to know why the "if not 
> fk['name']" is needed for SQLite...

not all foreign key constraints have names.   the ones that don't, you can't 
drop distinctly.

> 
> Shall I update the recipe with the above?

sure !


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to