adding unique constraint and example for getting id when sign up (for uploading image to new data)