Tagged with


SQLAlchemy Cascade Delete: Clarity through Examples

Since there is overlapping "cascade delete" functionality supported by SQLAlchemy -- with the ORM handling some deletes and the database itself handling others -- it can be hard to know the right way to set it up. Here are some examples to help clarify how it all works.

Starting Example

Here we …

Dressing the Database in Big-Boy Pants, Part 2

Last time I wrote about using dbdeploy to easily create local databases and to automatically apply changes to the development, staging and production databases. The other change I made recently was to add stored procedure unit tests.

I looked briefly at frameworks specifically for testing databases, but didn't see a …

Dressing the Database in Big-Boy Pants, Part 1

I've mentioned previously that I'm in no danger of being mistaken for a DBA, but I've recently made a few changes in how we work with our database that have upped the maturity level a bit.

Previously we had a single development database shared by all. This is an inflexible …