Update SQLiteDatabaseConfigurationHelper.php

In preparation for https://github.com/silverstripe/sapphire/pull/1319
Probably should accept this at the same time.

If someone knows of the relevant ALTER permissions in SQLite, feel free to implement.
This commit is contained in:
Stephen Shkardoon 2013-03-24 03:31:09 +13:00
parent 426b669233
commit 5e82d842ad

View File

@ -202,4 +202,15 @@ class SQLiteDatabaseConfigurationHelper implements DatabaseConfigurationHelper {
public static function secure_db_dir($path) {
return (is_writeable($path)) ? file_put_contents($path . '/.htaccess', 'deny from all') : false;
}
/**
* Ensure we have permissions to alter tables.
*
* @param array $databaseConfig Associative array of db configuration, e.g. "server", "username" etc
* @return array Result - e.g. array('okay' => true, 'applies' => true), where applies is whether
* the test is relevant for the database
*/
public function requireDatabaseAlterPermissions($databaseConfig) {
return array('success' => true, 'applies' => false);
}
}