hasColumnChanges example

$transaction->rollBack();
          }
        }
        else {
          // Recreate tables.           $this->performFieldSchemaOperation('create', $original);
        }
        throw $e;
      }
    }
    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.');
      }
      // 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       // exist unchanged.       $table_mapping = $this->getTableMapping($this->entityType, [$storage_definition]);
      $table = $table_mapping->getDedicatedDataTableName($original);
      $revision_table = $table_mapping->getDedicatedRevisionTableName($original);

      // Get the field schemas.       $schema = $storage_definition->getSchema();
      
Home | Imprint | This part of the site doesn't use cookies.