CC-3605 : Create 2.1 upgrades

This commit is contained in:
Naomi Aro 2012-04-10 11:23:34 +02:00
parent 743b5e33af
commit bf5eca605c
2 changed files with 27 additions and 12 deletions

View File

@ -24,18 +24,6 @@ class Version20120405114454 extends AbstractMigration
$cc_subjs_token->addNamedForeignKeyConstraint('cc_subjs_token_userid_fkey', $cc_subjs, array('user_id'), array('id'));
$cc_subjs_token->addUniqueIndex(array('token'), 'uniq_token');
//end create cc_subjs_token table
// change 'soundcloud_upload' -> 'soundcloud_auto_upload_recorded_show' CC-2928
//$this->_addSql("UPDATE cc_pref SET keystr = 'soundcloud_auto_upload_recorded_show'
//WHERE keystr = 'soundcloud_upload'");
//start changes to cc_files
//$cc_files = $schema->getTable('cc_files');
$this->_addSql("ALTER TABLE cc_files ALTER COLUMN bit_rate TYPE integer");
$this->_addSql("ALTER TABLE cc_files ALTER COLUMN sample_rate TYPE integer");
//end changes to cc_files
}
public function down(Schema $schema)

View File

@ -0,0 +1,27 @@
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
class Version20120410104441 extends AbstractMigration
{
public function up(Schema $schema)
{
//start changes to cc_files
$cc_files = $schema->getTable('cc_files');
$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
}
public function down(Schema $schema)
{
}
}