- Tightening unique constraints of im_projects:
  Fixed broken unique constraint in upgrade script
  when there are multiple projects with project_name
  or project_nr in the top level.
  A new functionality will add the project_id at the
  end of ambiguous project_nr or project_name.
-- fixed missing row var declaration