migrating to datamapper and SQL