On May 29, 2010, at 8:26 PM, jgarbers wrote: > On May 29, 2:42 pm, Michael Bayer <[email protected]> wrote: > >> to my knowledge sqlite does not support transactional DDL (seems to have >> some support, but its not fully operational) > > Hi, Michael -- and thanks for your quick help. I found a thread that > does seem to indicate that ALTER TABLE should roll back: > > http://www.mail-archive.com/[email protected]/msg34649.html > > From that thread: > > sqlite> create table foo (id integer, name text); > sqlite> begin immediate; > sqlite> alter table foo add number text; > sqlite> .schema > CREATE TABLE foo (id integer, name text, number text); > sqlite> rollback; > sqlite> .schema > CREATE TABLE foo (id integer, name text); > > So it appears that sqlite *should* be able to roll back my ALTER > TABLE. I don't see any COMMITs in SQLAlchemy's trace... any idea what > else might be happening? Thanks again!
SQLA issues DBAPI connection.commit() after all DDL expressions, assuming no SQLA-level transaction has been started. SQLA is compatible with transactional DDL, and it works fine with backends like Postgresql and MS-SQL. Whatever issue you're having here has to do with pysqlite and its transactional modes. You need to create a test case using pysqlite first. -- 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.
