mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
BUG Fix incorrect upgrade / rules
This commit is contained in:
parent
d09ab6bea4
commit
72638cf40e
@ -13,6 +13,7 @@ $sqliteDatabaseAdapterRegistryFields = array(
|
||||
);
|
||||
|
||||
// Basic SQLLite3 Database
|
||||
/** @skipUpgrade */
|
||||
DatabaseAdapterRegistry::register(
|
||||
array(
|
||||
'class' => 'SQLite3Database',
|
||||
@ -30,13 +31,14 @@ DatabaseAdapterRegistry::register(
|
||||
);
|
||||
|
||||
// PDO database
|
||||
/** @skipUpgrade */
|
||||
DatabaseAdapterRegistry::register(
|
||||
array(
|
||||
'class' => 'SQLite3PDODatabase',
|
||||
'title' => 'SQLite 3.3+ (using PDO)',
|
||||
'helperPath' => dirname(__FILE__).'/code/SQLiteDatabaseConfigurationHelper.php',
|
||||
'supported' => (class_exists('PDO') && in_array('sqlite', PDO::getAvailableDrivers())),
|
||||
'missingExtensionText' =>
|
||||
'missingExtensionText' =>
|
||||
'Either the <a href="http://php.net/manual/en/book.pdo.php">PDO Extension</a> or the
|
||||
<a href="http://php.net/manual/en/book.sqlite3.php">SQLite3 PDO Driver</a>
|
||||
are unavailable. Please install or enable these and refresh this page.',
|
||||
|
@ -62,7 +62,7 @@ class SQLite3Database extends SS_Database
|
||||
*/
|
||||
public static function database_extension()
|
||||
{
|
||||
return Config::inst()->get('SQLite3Database', 'database_extension');
|
||||
return Config::inst()->get('SilverStripe\\SQLite\\SQLite3Database', 'database_extension');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,6 +29,7 @@ class SQLiteDatabaseConfigurationHelper implements DatabaseConfigurationHelper
|
||||
protected function createConnection($databaseConfig, &$error)
|
||||
{
|
||||
$error = null;
|
||||
/** @skipUpgrade */
|
||||
try {
|
||||
if (!file_exists($databaseConfig['path'])) {
|
||||
self::create_db_dir($databaseConfig['path']);
|
||||
@ -149,6 +150,7 @@ class SQLiteDatabaseConfigurationHelper implements DatabaseConfigurationHelper
|
||||
{
|
||||
$version = 0;
|
||||
|
||||
/** @skipUpgrade */
|
||||
switch ($databaseConfig['type']) {
|
||||
case 'SQLite3Database':
|
||||
$info = SQLite3::version();
|
||||
|
Loading…
Reference in New Issue
Block a user