unit tested db spec creation functions, and refactored them to use :or in the map destructuring