// 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) { if (!
isset($schema[$table_name])) { $schema[$table_name] =
[];
}