Make db dependent on env