Amber sql

Persistence with versioning appears to be working, excepting the caveats in the code comments. I need to test with MySql properly and basically develop a set of good tests to. I'll do that next.