mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
ENHANCEMENT Added MSSQLDatabase::getVersion() to determine the current version of MSSQL in use
This commit is contained in:
parent
5ad91ce0ed
commit
b484b14be5
@ -188,12 +188,10 @@ class MSSQLDatabase extends SS_Database {
|
||||
|
||||
/**
|
||||
* Get the version of MSSQL.
|
||||
* NOTE: not yet implemented for MSSQL, we just return 2008; the minimum supported version
|
||||
* @return float
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion() {
|
||||
user_error("getVersion not implemented", E_USER_WARNING);
|
||||
return 2008;
|
||||
return trim($this->query("SELECT CONVERT(char(15), SERVERPROPERTY('ProductVersion'))")->value());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user