diff --git a/entity_path.install b/entity_path.install
index db121de..e50a9fe 100644
--- a/entity_path.install
+++ b/entity_path.install
@@ -29,7 +29,7 @@ function entity_path_schema() {
       'cid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => FALSE,
+        'not null' => TRUE,
         'description' => 'The primary identifier for a entity_path configuration set.',
       ),
       'instance' => array(
@@ -107,4 +107,17 @@ function entity_path_update_7101() {
   }
 
   return t('You now can specify query and fragment in your entity path configurations.');
-}
\ No newline at end of file
+}
+
+/**
+ * Updates cid for MySQL 5.7 compatibility.
+ */
+function entity_path_update_7102() {
+  $cid = array(
+    'type' => 'serial',
+    'unsigned' => TRUE,
+    'not null' => TRUE,
+    'description' => 'The primary identifier for a entity_path configuration set.',
+  );
+  db_change_field('entity_path_config', 'cid', 'cid', $cid);
+}
