MySQL Varchar Primary Key With Not Null Constraint Accepting Nulls
To prevent this insert from occurring, turn on strict mode.

mysql&gt; set session sql_mode = 'STRICT_TRANS_TABLES';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql&gt; INSERT INTO invite (`email`) VALUES ('e@mail.com');
ERROR 1364 (HY000): Field 'id' doesn't have a default value
mysql&gt; select * from invite;
Empty set (0.00 sec)


Note: Be sure to follow the description in the link I provided, NOT copy my command regarding setting sql_mode. Otherwise you may disable other settings.