add tools

add db tools for migration and exploration. Originally written by @eordano