SQLAlchemy integration

Hm. That suggests it's not smart enough, but I don't think it matters particularly here. We can reevaluate if it causes issues.