Wolodja Wentland wrote: > Hi all, > > is it possible to drop primary key indexes from within SA? I already > found the table.indexes set, but it does not contain the primary key > index. I can therefore drop all indexes for a table except the primary > key one. > > It seems to me as if SA relies on a strict naming scheme for primary key > indexes in the form of "tablename_pkey" is this correct and could i rely > on that if i want to drop the index manually? What happens if there > already is a table with that name prior to table creation? > > As you might have guessed i also would like to recreate this index later > on. Is there a automatic way to do so, or do i have to define the index > by myself?
this is not correct. SQLAlchemy creates the "primary key" of a table only, using the standard DDL for PRIMARY KEY. The associated "index" and its naming convention is automatically generated by your database, and is not within the control of SQLAlchemy. if you'd like to drop the primary key constraint entirely, you'd have to issue the requisite ALTER statements appropriate for your database. As far as dropping just the "index" part, that again is a database specific issue and you'd have to consult your database's documentation. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
