Convert database schema to lobos.

Test against both sqlite and h2 databases.