modified the ShortenedUrl Model to get rid of bug with null constraint on unique_key attribute when creating record