Generates a table name for a field revision archive table.
When a field is a deleted, the table is renamed to {field_deleted_revision_FIELD_UUID}. To make sure we don't end up with table names longer than 64 characters, we hash the uuid and return the first 10 characters so we end up with a short unique ID.
$name: The field structure.
A string containing the generated name for the database table.
function _field_sql_storage_revision_tablename($field) {
if ($field['deleted']) {
return "field_deleted_revision_" . substr(hash('sha256', $field['uuid']), 0, 10);
}
else {
return "field_revision_{$field['field_name']}";
}
}