fixed photo and album unique constraints problems