Couch db migration to new database api