CC-3605 : Create 2.1 upgrades

This commit is contained in:
Naomi Aro 2012-04-10 12:00:01 +02:00
parent bf5eca605c
commit 189b7cf61d
3 changed files with 21 additions and 4 deletions

View file

@ -11,7 +11,7 @@ class AirtimeDatabaseUpgrade{
}
private static function task0(){
UpgradeCommon::MigrateTablesToVersion(__DIR__, '20120405114454');
UpgradeCommon::MigrateTablesToVersion(__DIR__, '20120410115311');
$sql = "INSERT INTO cc_pref(\"keystr\", \"valstr\") VALUES('scheduled_play_switch', 'on')";
UpgradeCommon::nonSelectQueryDb($sql);
}

View file

@ -14,9 +14,6 @@ class Version20120410104441 extends AbstractMigration
$cc_files->addColumn('temp_br', 'integer');
$cc_files->addColumn('temp_sr', 'integer');
$this->_addSql("UPDATE cc_files SET temp_br = bit_rate::integer");
$this->_addSql("UPDATE cc_files SET temp_sr = sample_rate::integer");
//end changes to cc_files
}

View file

@ -0,0 +1,20 @@
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
class Version20120410115311 extends AbstractMigration
{
public function up(Schema $schema)
{
$this->_addSql("UPDATE cc_files SET temp_br = bit_rate::integer");
$this->_addSql("UPDATE cc_files SET temp_sr = sample_rate::integer");
}
public function down(Schema $schema)
{
}
}