$entity_type_id =
$entity_type->
id();
if (!
isset($this->schema
[$entity_type_id]) ||
$reset) { // Prepare basic information about the entity type.
/** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */
$table_mapping =
$this->
getTableMapping($entity_type,
$this->fieldStorageDefinitions
);
$tables =
$this->
getEntitySchemaTables($table_mapping);
// Initialize the table schema.
$schema[$tables['base_table'
]] =
$this->
initializeBaseTable($entity_type);
if (isset($tables['revision_table'
])) { $schema[$tables['revision_table'
]] =
$this->
initializeRevisionTable($entity_type);
} if (isset($tables['data_table'
])) { $schema[$tables['data_table'
]] =
$this->
initializeDataTable($entity_type);
} if (isset($tables['revision_data_table'
])) { $schema[$tables['revision_data_table'
]] =
$this->
initializeRevisionDataTable($entity_type);
} // We need to act only on shared entity schema tables.
$table_names =
array_diff($table_mapping->
getTableNames(),
$table_mapping->
getDedicatedTableNames());
foreach ($table_names as $table_name) {