Minor fix on code generation of permissions.

Minor fix on permissions editing form.

Fixed a bug on database import process that was crashing the application
whenever importing a composite type.

Model db diff process checkpoint