BUG Fix incorrect upgrade / rules

This commit is contained in:
Damian Mooyman 2016-07-05 16:27:01 +12:00
parent d09ab6bea4
commit 72638cf40e
3 changed files with 6 additions and 2 deletions

View File

@ -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.',

View File

@ -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');
}
/**

View File

@ -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();