diff --git a/group.install b/group.install
index dd57ed9..ec9774f 100644
--- a/group.install
+++ b/group.install
@@ -326,3 +326,20 @@ function group_update_10304(&$sandbox) {
   $state->set('group_update_10300_detected_legacy_version', !$old_value);
   $state->delete('group_update_10300_detected_version');
 }
+
+/**
+* Fixes "group_content_type" entity type does not exist error after upgrading
+* from Group module version 2.x to 3.x.
+*/
+function group_update_10305(&$sandbox) {
+  // Check if the field storage definition exists.
+  $field_storage_definition = \Drupal::entityDefinitionUpdateManager()
+    ->getFieldStorageDefinition('type', 'group_relationship');
+
+  if ($field_storage_definition) {
+
+    // Update the field storage definition to use the correct target type.
+    $field_storage_definition->setSetting('target_type', 'group_relationship');
+    \Drupal::entityDefinitionUpdateManager()->updateFieldStorageDefinition($field_storage_definition);
+  }
+}
