Added 2.5.12 upgrader and increased show/show instance description field
length
This commit is contained in:
parent
ae02fe7816
commit
79d2ae12fb
5 changed files with 57 additions and 5 deletions
|
@ -388,3 +388,52 @@ class AirtimeUpgrader2511 extends AirtimeUpgrader
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
class AirtimeUpgrader2512 extends AirtimeUpgrader
|
||||
{
|
||||
protected function getSupportedVersions() {
|
||||
return array (
|
||||
'2.5.10',
|
||||
'2.5.11'
|
||||
);
|
||||
}
|
||||
|
||||
public function getNewVersion() {
|
||||
return '2.5.12';
|
||||
}
|
||||
|
||||
public function upgrade($dir = __DIR__) {
|
||||
Cache::clear();
|
||||
assert($this->checkIfUpgradeSupported());
|
||||
|
||||
$newVersion = $this->getNewVersion();
|
||||
|
||||
try {
|
||||
$this->toggleMaintenanceScreen(true);
|
||||
Cache::clear();
|
||||
|
||||
// Begin upgrade
|
||||
$airtimeConf = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : "/etc/airtime/airtime.conf";
|
||||
$values = parse_ini_file($airtimeConf, true);
|
||||
|
||||
$username = $values['database']['dbuser'];
|
||||
$password = $values['database']['dbpass'];
|
||||
$host = $values['database']['host'];
|
||||
$database = $values['database']['dbname'];
|
||||
|
||||
passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/upgrade_sql/airtime_"
|
||||
.$this->getNewVersion()."/upgrade.sql $database 2>&1 | grep -v -E \"will create implicit sequence|will create implicit index\"");
|
||||
|
||||
Application_Model_Preference::SetAirtimeVersion($newVersion);
|
||||
Cache::clear();
|
||||
|
||||
$this->toggleMaintenanceScreen(false);
|
||||
} catch(Exception $e) {
|
||||
$this->toggleMaintenanceScreen(false);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
public function downgrade() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue