refactor ContactKind to ContactType.

able to update inv data and inv id.

update schema for on update cascade.