CC-3605 : Create 2.1 upgrades
This commit is contained in:
parent
baadfde1a9
commit
74aa9bf4f1
|
@ -7,6 +7,9 @@ use Doctrine\DBAL\Migrations\AbstractMigration,
|
|||
|
||||
class Version20120410104441 extends AbstractMigration
|
||||
{
|
||||
/*
|
||||
* contains modifications to cc_files for 2.1
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
//add temp columns for changing bitrate and sample rate to integers.
|
||||
|
@ -21,6 +24,10 @@ class Version20120410104441 extends AbstractMigration
|
|||
|
||||
$this->_addSql("ALTER TABLE cc_files RENAME COLUMN temp_sr TO sample_rate");
|
||||
$this->_addSql("ALTER TABLE cc_files RENAME COLUMN temp_br TO bit_rate");
|
||||
|
||||
//add utime, lptime
|
||||
$this->_addSql("ALTER TABLE cc_files ADD utime timestamp(6)");
|
||||
$this->_addSql("ALTER TABLE cc_files ADD lptime timestamp(6)");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
|
|
|
@ -7,10 +7,12 @@ use Doctrine\DBAL\Migrations\AbstractMigration,
|
|||
|
||||
class Version20120410143340 extends AbstractMigration
|
||||
{
|
||||
/*
|
||||
* contains modifications to cc_playlist for 2.1
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
//convert column creator to be creator_id on cc_playlist
|
||||
|
||||
//convert column creator to be creator_id on cc_playlist
|
||||
$this->_addSql("ALTER TABLE cc_playlist ADD creator_id integer");
|
||||
$this->_addSql("UPDATE cc_playlist SET creator_id = (SELECT id FROM cc_subjs WHERE creator = login)");
|
||||
$this->_addSql("ALTER TABLE cc_playlist DROP COLUMN creator");
|
||||
|
|
Loading…
Reference in New Issue