function install_verify_database_ready

install_verify_database_ready()

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

File

core/includes/install.core.inc, line 1110
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'));
    }
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!install.core.inc/function/install_verify_database_ready/8.1.x