public function BatchStorage::schemaDefinition in Drupal 9
Same name in this branch
- 9 core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::schemaDefinition()
- 9 core/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php \Drupal\Core\ProxyClass\Batch\BatchStorage::schemaDefinition()
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::schemaDefinition()
Defines the schema for the batch table.
@internal
1 call to BatchStorage::schemaDefinition()
- BatchStorage::ensureTableExists in core/
lib/ Drupal/ Core/ Batch/ BatchStorage.php - Check if the table exists and create it if not.
File
- core/
lib/ Drupal/ Core/ Batch/ BatchStorage.php, line 206
Class
Namespace
Drupal\Core\BatchCode
public function schemaDefinition() {
return [
'description' => 'Stores details about batches (processes that run in multiple HTTP requests).',
'fields' => [
'bid' => [
'description' => 'Primary Key: Unique batch ID.',
// This is not a serial column, to allow both progressive and
// non-progressive batches. See batch_process().
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'token' => [
'description' => "A string token generated against the current user's session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.",
'type' => 'varchar_ascii',
'length' => 64,
'not null' => TRUE,
],
'timestamp' => [
'description' => 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',
'type' => 'int',
'not null' => TRUE,
],
'batch' => [
'description' => 'A serialized array containing the processing data for the batch.',
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
],
],
'primary key' => [
'bid',
],
'indexes' => [
'token' => [
'token',
],
],
];
}