Customized error message and finally created db constraints