function Tasks::initializeDatabase in Drupal driver for SQL Server and SQL Azure 8
Same name and namespace in other branches
- 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Install/Tasks.php \Drupal\Driver\Database\sqlsrv\Install\Tasks::initializeDatabase()
- 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Install/Tasks.php \Drupal\Driver\Database\sqlsrv\Install\Tasks::initializeDatabase()
Make SQLServer Drupal friendly.
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Install/ Tasks.php, line 148 - Definition of Drupal\Driver\Database\sqlsrv\Tasks
Class
- Tasks
- Specifies installation tasks for PostgreSQL databases.
Namespace
Drupal\Driver\Database\sqlsrv\InstallCode
function initializeDatabase() {
// We create some functions using global names instead of prefixing them
// like we do with table names. This is so that we don't double up if more
// than one instance of Drupal is running on a single database. We therefore
// avoid trying to create them again in that case.
try {
/** @var Connection $database */
$connection = Database::getConnection();
Utils::DeployCustomFunctions($connection);
$this
->pass(t('SQLServer has initialized itself.'));
} catch (\Exception $e) {
$this
->fail(t('Drupal could not be correctly setup with the existing database. Revise any errors.'));
}
}