Unable to add new 'mqtt' events (error in 'insert' query)

Apologies - bug in my original pull request. Found and fixed by Jason/Nubble.

Please merge this asap as the original code won't allow new MQTT events to be created.