add unique validation to database and migrate db