MySQL fix: Field ‘xxxx’ doesn’t have a default value

I’ve recently been working on a few of our older websites with newer MySQL installations and am coming across the following error:

SQLSTATE[HY000]: General error: 1364 Field ‘delivery_address_id’ doesn’t have a default value

This is caused by MySQL having a strict mode set which won’t allow INSERT or UPDATE commands with empty fields where the schema doesn’t have a default value set.
There are a couple of fixes for this.

Useful Oh-My-Zsh plugins

Oh-My-Zsh describes itself as a ‘community driven framework for managing your zsh configuration’ and comes with lots of zsh plugins (189 currently) but none are enabled by default. Some zsh plugins are tailored for your specific operating system whilst others are aimed at helping improve developers workflow. Wether you’re using Ruby, Python, PHP or Javascript as your main language or you’re a systems administrator, there will be a plugin to help. Here are the zsh plugins I’m currently using.