am-impact / amnav

Navigation plugin for Craft
168 stars 20 forks source link

When upgrading from 1.4.3 the `url` field on the `amnav_nodes` table isn’t defaulted to NULL #76

Open joshangell opened 8 years ago

joshangell commented 8 years ago

This causes nodes to not save. I upgraded from some version pre 1.4.4 to 1.7.4 and the issue arose.

I fixed it by editing the schema of craft_amnav_nodes and setting the allow null option to true and the default value to NULL.

This was likely missed in the migration for ccccb0628433499c9c66a5b31079ef625c395fc2, specifically see line 18 of records/AmNav_NodeRecord.php for the change that didn’t get migrated.

Interestingly my local MySQL (5.7.10) didn’t throw an error but my live one did (5.7.12), bit weird if you ask me.