added main db routes and fixed schema