diff --git a/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php b/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php index 7d306ab06..5d5c5d568 100644 --- a/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php +++ b/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php @@ -11,7 +11,7 @@ class AirtimeDatabaseUpgrade{ } private static function task0(){ - UpgradeCommon::MigrateTablesToVersion(__DIR__, '20120410104441'); + UpgradeCommon::MigrateTablesToVersion(__DIR__, '20120410134819'); $sql = "INSERT INTO cc_pref(\"keystr\", \"valstr\") VALUES('scheduled_play_switch', 'on')"; UpgradeCommon::nonSelectQueryDb($sql); } diff --git a/install_minimal/upgrades/airtime-2.1.0/common/Version20120410104441.php b/install_minimal/upgrades/airtime-2.1.0/common/Version20120410104441.php index a16d5c5bb..1db3b6b07 100644 --- a/install_minimal/upgrades/airtime-2.1.0/common/Version20120410104441.php +++ b/install_minimal/upgrades/airtime-2.1.0/common/Version20120410104441.php @@ -11,18 +11,8 @@ class Version20120410104441 extends AbstractMigration { //add temp columns for changing bitrate and sample rate to integers. $cc_files = $schema->getTable('cc_files'); - $cc_files->addColumn('temp_br', 'integer', array('notnull' => 0)); + $cc_files->addColumn('temp_br', 'integer', array('notnull' => 0)); $cc_files->addColumn('temp_sr', 'integer', array('notnull' => 0)); - - $this->addSql("UPDATE cc_files SET temp_br = bit_rate::integer"); - $this->addSql("UPDATE cc_files SET temp_sr = sample_rate::integer"); - - $cc_files = $schema->getTable('cc_files'); - $cc_files->dropColumn('bit_rate'); - $cc_files->dropColumn('sample_rate'); - - $cc_files->renameColumn('temp_br', 'bit_rate'); - $cc_files->renameColumn('temp_sr', 'sample_rate'); } public function down(Schema $schema) diff --git a/install_minimal/upgrades/airtime-2.1.0/common/Version20120410134819.php b/install_minimal/upgrades/airtime-2.1.0/common/Version20120410134819.php new file mode 100644 index 000000000..1ca394d1f --- /dev/null +++ b/install_minimal/upgrades/airtime-2.1.0/common/Version20120410134819.php @@ -0,0 +1,27 @@ +_addSql("UPDATE cc_files SET temp_br = bit_rate::integer"); + $this->_addSql("UPDATE cc_files SET temp_sr = sample_rate::integer"); + + $cc_files = $schema->getTable('cc_files'); + $cc_files->dropColumn('bit_rate'); + $cc_files->dropColumn('sample_rate'); + + $cc_files->renameColumn('temp_br', 'bit_rate'); + $cc_files->renameColumn('temp_sr', 'sample_rate'); + } + + public function down(Schema $schema) + { + + } +} \ No newline at end of file