update devices table