adding uniqe and indexing to message model