add crate support to db module