Model db diff feature checkpoint.

Minor bug fix on database import process that was causing some crashes.

Minor improvements on "move to schema" feature on model widget. The
references to moved object are now correctly updated.