protected SqlContentEntityStorageSchema::deleteDedicatedTableSchema(FieldStorageDefinitionInterface $storage_definition)
Deletes the schema for a field stored in a dedicated table.
Parameters
\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The storage definition of the field being deleted.
File
- core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 1181
Class
- SqlContentEntityStorageSchema
- Defines a schema handler that supports revisionable, translatable entities.
Namespace
Drupal\Core\Entity\Sql
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | protected function deleteDedicatedTableSchema(FieldStorageDefinitionInterface $storage_definition ) { // When switching from dedicated to shared field table layout we need need // to delete the field tables with their regular names. When this happens // original definitions will be defined. $deleted = ! $this ->originalDefinitions; $table_mapping = $this ->storage->getTableMapping(); $table_name = $table_mapping ->getDedicatedDataTableName( $storage_definition , $deleted ); $this ->database->schema()->dropTable( $table_name ); if ( $this ->entityType->isRevisionable()) { $revision_name = $table_mapping ->getDedicatedRevisionTableName( $storage_definition , $deleted ); $this ->database->schema()->dropTable( $revision_name ); } $this ->deleteFieldSchemaData( $storage_definition ); } |
Please login to continue.