Fixing a syntax error in addDevice.sql and replacing idMax in
Database::registerDevice by maxId.