function DatabaseStorage::ensureTableExists
Check if the config table exists and create it if not.
Return value
bool TRUE if the table was created, FALSE otherwise.
Throws
\Drupal\Core\Config\StorageException If a database error occurs.
1 call to DatabaseStorage::ensureTableExists()
- DatabaseStorage::write in core/lib/ Drupal/ Core/ Config/ DatabaseStorage.php 
- Writes configuration data to the storage.
File
- 
              core/lib/ Drupal/ Core/ Config/ DatabaseStorage.php, line 177 
Class
- DatabaseStorage
- Defines the Database storage.
Namespace
Drupal\Core\ConfigCode
protected function ensureTableExists() {
  try {
    $this->connection
      ->schema()
      ->createTable($this->table, static::schemaDefinition());
  } catch (DatabaseException $e) {
    return TRUE;
  } catch (\Exception $e) {
    return FALSE;
  }
  return TRUE;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
