Re: [sqlalchemy] is it possible to turn off DELETE cascades globally for a session?

2015-03-31 Thread Jonathan Vanasco
Thanks! The workaround is best for my purposes. I need to keep the relationships for the app, but they were benching to triple the migration script's timing.Using the engine directly to get around this, everything migrated overnight. _delete = dbSession.execute(

[sqlalchemy] is it possible to turn off DELETE cascades globally for a session?

2015-03-30 Thread Jonathan Vanasco
I'm running a migration script, and the deletes via the ORM were creating a performance issue. (trying to load 4 relationships 9million times adds up) I couldn't find any docs for this (just some references on update cascades) so i sidestepped the issue by just running the Engine's delete on

Re: [sqlalchemy] is it possible to turn off DELETE cascades globally for a session?

2015-03-30 Thread Michael Bayer
it’s not an option available at the moment, though there might be ways to avoid the collection loads (artificially zeroing them out w/o history). if you don’t need the relationship features then you might as well just use query.delete(). Jonathan Vanasco jonat...@findmeon.com wrote: I'm