Skip to content

Instantly share code, notes, and snippets.

@hugronaphor
Created November 10, 2022 10:36
Show Gist options
  • Save hugronaphor/d8bfd7e7bd698f2dae94b0a56eaef51c to your computer and use it in GitHub Desktop.
Save hugronaphor/d8bfd7e7bd698f2dae94b0a56eaef51c to your computer and use it in GitHub Desktop.
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
index 46e96c9a88..04b65e399b 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
@@ -1748,7 +1748,7 @@ protected function updateDedicatedTableSchema(FieldStorageDefinitionInterface $s
}
else {
if ($this->hasColumnChanges($storage_definition, $original)) {
- throw new FieldStorageDefinitionUpdateForbiddenException('The SQL storage cannot change the schema for an existing field (' . $storage_definition->getName() . ' in ' . $storage_definition->getTargetEntityTypeId() . ' entity) with data.');
+ // throw new FieldStorageDefinitionUpdateForbiddenException('The SQL storage cannot change the schema for an existing field (' . $storage_definition->getName() . ' in ' . $storage_definition->getTargetEntityTypeId() . ' entity) with data.');
}
// There is data, so there are no column changes. Drop all the prior
// indexes and create all the new ones, except for all the priors that
@@ -1839,7 +1839,7 @@ protected function updateSharedTableSchema(FieldStorageDefinitionInterface $stor
}
else {
if ($this->hasColumnChanges($storage_definition, $original)) {
- throw new FieldStorageDefinitionUpdateForbiddenException('The SQL storage cannot change the schema for an existing field (' . $storage_definition->getName() . ' in ' . $storage_definition->getTargetEntityTypeId() . ' entity) with data.');
+ // throw new FieldStorageDefinitionUpdateForbiddenException('The SQL storage cannot change the schema for an existing field (' . $storage_definition->getName() . ' in ' . $storage_definition->getTargetEntityTypeId() . ' entity) with data.');
}
$updated_field_name = $storage_definition->getName();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment