updated uniqueness constraints for HABTM