[sqlalchemy] DropConstraint exception

2010-04-14 Thread Gerry Reno
Ok, I tried this: from sqlalchemy.schema import DropConstraint for table in metadata.tables.keys(): for con in metadata.tables[table].constraints: if isinstance(con, PrimaryKeyConstraint): engine.execute(DropConstraint(con)) but I'm getting an exception:

Re: [sqlalchemy] DropConstraint exception

2010-04-14 Thread Michael Bayer
seems like a bug, actually. does that PrimaryKeyConstraint have a name ? we don't usually issue a DropConstraint on a PK constraint like that. On Apr 14, 2010, at 7:35 PM, Gerry Reno wrote: Ok, I tried this: from sqlalchemy.schema import DropConstraint for table in