You are here

function install_verify_database_ready in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/install.core.inc \install_verify_database_ready()

Verify that the database is ready (no existing Drupal installation).

File

core/includes/install.core.inc, line 1100
API functions for installing Drupal.

Code

function install_verify_database_ready() {
  $system_schema = system_schema();
  end($system_schema);
  $table = key($system_schema);
  if ($database = Database::getConnectionInfo()) {
    if (Database::getConnection()
      ->schema()
      ->tableExists($table)) {
      throw new AlreadyInstalledException(\Drupal::service('string_translation'));
    }
  }
}