*/
public $parent;
+ /**
+ * @var string Set by subclasses
+ */
+ public static $minimumVersion;
+
+ /**
+ * @var string Set by subclasses
+ */
+ protected static $notMiniumumVerisonMessage;
+
/**
* The database connection.
*
*/
protected $globalNames = [];
+ /**
+ * Whether the provided version meets the necessary requirements for this type
+ *
+ * @param string $serverVersion Output of Database::getServerVersion()
+ * @return Status
+ * @since 1.30
+ */
+ public static function meetsMinimumRequirement( $serverVersion ) {
+ if ( version_compare( $serverVersion, static::$minimumVersion ) < 0 ) {
+ return Status::newFatal(
+ static::$notMiniumumVerisonMessage, static::$minimumVersion, $serverVersion
+ );
+ }
+
+ return Status::newGood();
+ }
+
/**
* Return the internal name, e.g. 'mysql', or 'sqlite'.
*/