added db environment
fixed migrations