Fixes for #238

Not done yet, migrating back doesn't work yet, but it's a start -- models are properly serialized now! (Requires endusers to recreate the migrations, or manually replace them) Refs #238