added database structure migrations

removed /api from endpoints