Added setting and removing indexes when relation type change