diff --git a/airtime_mvc/application/controllers/UpgradeController.php b/airtime_mvc/application/controllers/UpgradeController.php
index 9af3dc1e9..518e173ac 100644
--- a/airtime_mvc/application/controllers/UpgradeController.php
+++ b/airtime_mvc/application/controllers/UpgradeController.php
@@ -20,7 +20,8 @@ class UpgradeController extends Zend_Controller_Action
array_push($upgraders, new AirtimeUpgrader259());
array_push($upgraders, new AirtimeUpgrader2510());
array_push($upgraders, new AirtimeUpgrader2511());
-
+ array_push($upgraders, new AirtimeUpgrader2512());
+
$didWePerformAnUpgrade = false;
try
{
diff --git a/airtime_mvc/application/controllers/upgrade_sql/airtime_2.5.12/upgrade.sql b/airtime_mvc/application/controllers/upgrade_sql/airtime_2.5.12/upgrade.sql
new file mode 100644
index 000000000..92ca30ade
--- /dev/null
+++ b/airtime_mvc/application/controllers/upgrade_sql/airtime_2.5.12/upgrade.sql
@@ -0,0 +1,2 @@
+ALTER TABLE cc_show ALTER COLUMN description TYPE varchar(8192);
+ALTER TABLE cc_show_instances ALTER COLUMN description TYPE varchar(8192);
diff --git a/airtime_mvc/application/upgrade/Upgrades.php b/airtime_mvc/application/upgrade/Upgrades.php
index 0b0edb442..9468753d6 100644
--- a/airtime_mvc/application/upgrade/Upgrades.php
+++ b/airtime_mvc/application/upgrade/Upgrades.php
@@ -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() {
+
+ }
+}
diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml
index ef382454c..ece788ea7 100644
--- a/airtime_mvc/build/schema.xml
+++ b/airtime_mvc/build/schema.xml
@@ -139,7 +139,7 @@