diff options
Diffstat (limited to 'core/modules/pgsql/pgsql.install')
-rw-r--r-- | core/modules/pgsql/pgsql.install | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/core/modules/pgsql/pgsql.install b/core/modules/pgsql/pgsql.install index 3adeb4f5dff3..682ef7d605b5 100644 --- a/core/modules/pgsql/pgsql.install +++ b/core/modules/pgsql/pgsql.install @@ -5,42 +5,6 @@ * Install, update and uninstall functions for the pgsql module. */ -use Drupal\Core\Database\Database; - -/** - * Implements hook_requirements(). - */ -function pgsql_requirements(): array { - $requirements = []; - // Test with PostgreSQL databases for the status of the pg_trgm extension. - if (Database::isActiveConnection()) { - $connection = Database::getConnection(); - - // Set the requirement just for postgres. - if ($connection->driver() == 'pgsql') { - $requirements['pgsql_extension_pg_trgm'] = [ - 'severity' => REQUIREMENT_OK, - 'title' => t('PostgreSQL pg_trgm extension'), - 'value' => t('Available'), - 'description' => 'The pg_trgm PostgreSQL extension is present.', - ]; - - // If the extension is not available, set the requirement error. - if (!$connection->schema()->extensionExists('pg_trgm')) { - $requirements['pgsql_extension_pg_trgm']['severity'] = REQUIREMENT_ERROR; - $requirements['pgsql_extension_pg_trgm']['value'] = t('Not created'); - $requirements['pgsql_extension_pg_trgm']['description'] = t('The <a href=":pg_trgm">pg_trgm</a> PostgreSQL extension is not present. The extension is required by Drupal 10 to improve performance when using PostgreSQL. See <a href=":requirements">Drupal database server requirements</a> for more information.', [ - ':pg_trgm' => 'https://www.postgresql.org/docs/current/pgtrgm.html', - ':requirements' => 'https://www.drupal.org/docs/system-requirements/database-server-requirements', - ]); - } - - } - } - - return $requirements; -} - /** * Implements hook_update_last_removed(). */ |