From 5e82d842adc2c321d4a24f08eee272e4ac03477a Mon Sep 17 00:00:00 2001 From: Stephen Shkardoon Date: Sun, 24 Mar 2013 03:31:09 +1300 Subject: [PATCH] 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. --- code/SQLiteDatabaseConfigurationHelper.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/SQLiteDatabaseConfigurationHelper.php b/code/SQLiteDatabaseConfigurationHelper.php index 5d8fcd4..2c8302e 100644 --- a/code/SQLiteDatabaseConfigurationHelper.php +++ b/code/SQLiteDatabaseConfigurationHelper.php @@ -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); + } }