From 0c7362bbc5dd6cbb679b9c923b638497f8fe6fb4 Mon Sep 17 00:00:00 2001 From: Stephen Shkardoon Date: Sun, 24 Mar 2013 02:59:34 +1300 Subject: [PATCH] Update PostgreSQLDatabaseConfigurationHelper.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In prepration 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 Postgres, feel free to implment. --- code/PostgreSQLDatabaseConfigurationHelper.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/code/PostgreSQLDatabaseConfigurationHelper.php b/code/PostgreSQLDatabaseConfigurationHelper.php index efcbd52..53397bd 100644 --- a/code/PostgreSQLDatabaseConfigurationHelper.php +++ b/code/PostgreSQLDatabaseConfigurationHelper.php @@ -161,5 +161,16 @@ class PostgreSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelp 'alreadyExists' => $alreadyExists ); } - + + /** + * 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); + } + }