Added the unique constraint on the name of department.
Made sure that on edition, the future machine's name also changes.