function BatchStorage::ensureTableExists
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::ensureTableExists()
- 10 core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::ensureTableExists()
- 9 core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::ensureTableExists()
- 8.9.x core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::ensureTableExists()
Check if the table exists and create it if not.
1 call to BatchStorage::ensureTableExists()
- BatchStorage::getId in core/
lib/ Drupal/ Core/ Batch/ BatchStorage.php
File
-
core/
lib/ Drupal/ Core/ Batch/ BatchStorage.php, line 174
Class
- BatchStorage
- Defines the storage handler class for batches.
Namespace
Drupal\Core\BatchCode
protected function ensureTableExists() {
try {
$this->connection
->schema()
->createSchemaFromDefinition($this->schemaDefinition());
} catch (DatabaseException) {
} catch (\Exception) {
return FALSE;
}
return TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.