migrate couchdb items to postgres