resolved sql schema mistakes