BatchStorage::schemaDefinition

public BatchStorage::schemaDefinition()

Defines the schema for the batch table.

File

core/lib/Drupal/Core/Batch/BatchStorage.php, line 204

Class

BatchStorage

Namespace

Drupal\Core\Batch

Code

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'],
    ],
  ];
}
doc_Drupal
2016-10-29 08:46:09
Comments
Leave a Comment

Please login to continue.