Foreign key constraint in sensors table

I have outlined my issue here in this gist. This was a large server move and the new server is running great. I just want to find out what these mysql errors are when I run the fix suggested.