mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-09-28 20:29:06 +02:00
c124e8c9f3
The pre-check for PostgreSQL needs to look for pgsql and changed the error text to link to the PostgreSQL PDO documentation instead of the Microsoft SQL Server documentation.
35 lines
1.4 KiB
PHP
35 lines
1.4 KiB
PHP
<?php
|
|
|
|
use SilverStripe\Dev\Install\DatabaseAdapterRegistry;
|
|
use SilverStripe\PostgreSQL\PostgreSQLDatabaseConfigurationHelper;
|
|
|
|
// PDO Postgre database
|
|
DatabaseAdapterRegistry::register(array(
|
|
/** @skipUpgrade */
|
|
'class' => 'PostgrePDODatabase',
|
|
'module' => 'postgresql',
|
|
'title' => 'PostgreSQL 8.3+ (using PDO)',
|
|
'helperPath' => __DIR__.'/code/PostgreSQLDatabaseConfigurationHelper.php',
|
|
'helperClass' => PostgreSQLDatabaseConfigurationHelper::class,
|
|
'supported' => (class_exists('PDO') && in_array('pgsql', PDO::getAvailableDrivers())),
|
|
'missingExtensionText' =>
|
|
'Either the <a href="http://www.php.net/manual/en/book.pdo.php">PDO Extension</a> or
|
|
the <a href="http://www.php.net/manual/en/ref.pdo-pgsql.php">PostgreSQL PDO Driver</a>
|
|
are unavailable. Please install or enable these and refresh this page.'
|
|
));
|
|
|
|
|
|
// PDO Postgre database
|
|
DatabaseAdapterRegistry::register(array(
|
|
/** @skipUpgrade */
|
|
'class' => 'PostgreSQLDatabase',
|
|
'module' => 'postgresql',
|
|
'title' => 'PostgreSQL 8.3+ (using pg_connect)',
|
|
'helperPath' => __DIR__.'/code/PostgreSQLDatabaseConfigurationHelper.php',
|
|
'helperClass' => PostgreSQLDatabaseConfigurationHelper::class,
|
|
'supported' => function_exists('pg_connect'),
|
|
'missingExtensionText' =>
|
|
'The <a href="http://php.net/pgsql">pgsql</a> PHP extension is not
|
|
available. Please install or enable it and refresh this page.'
|
|
));
|