auto remove relates table