Updated the way database migrations are handled, added support for tms layers, and caching them as base layers