SAAS-547: Refactor upgrade procedure in 2.5.x-installer branch

* Start using "schema_version" key instead of "system_version"
* Refactored the upgrade code a bit and make it be automatically invoked
  from the Zend bootstrap if a schema update is needed.
* Fixed error logging in certain cases
* Fixed an exception in Show related to image_path
This commit is contained in:
Albert Santoni 2015-01-19 13:41:23 -05:00
parent 5abe364a69
commit 2cb26db84b
7 changed files with 81 additions and 34 deletions

View file

@ -862,10 +862,22 @@ class Application_Model_Preference
return self::getValue("enable_stream_conf");
}
public static function SetAirtimeVersion($version)
public static function GetSchemaVersion()
{
self::setValue("system_version", $version);
$schemaVersion = self::getValue("schema_version");
//Pre-2.5.2 releases all used this ambiguous "system_version" key to represent both the code and schema versions...
if (empty($schemaVersion)) {
$schemaVersion = self::getValue("system_version");
}
return $schemaVersion;
}
public static function SetSchemaVersion($version)
{
self::setValue("schema_version", $version);
}
public static function GetAirtimeVersion()