CC-3605 : Create 2.1 upgrades

This commit is contained in:
Naomi Aro 2012-04-11 18:16:20 +02:00
parent 08162de842
commit 37c929f610
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,8 @@ class Version20120411102907 extends AbstractMigration
$this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN cue_out TYPE interval");
$this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN clip_length TYPE interval");
$this->_addSql("ALTER TABLE cc_show_instances ALTER COLUMN time_filled TYPE interval");
//remove old columns from cc_schedule that deal with groups or playlists.
$this->_addSql("ALTER TABLE cc_schedule DROP COLUMN group_id");
$this->_addSql("ALTER TABLE cc_schedule DROP COLUMN schedule_group_played");

View File

@ -14,6 +14,11 @@ class Version20120411174904 extends AbstractMigration
{
$this->_addSql("ALTER TABLE cc_show_instances ADD created timestamp(6)");
$this->_addSql("ALTER TABLE cc_show_instances ADD last_scheduled timestamp(6)");
//setting these to a default now for timeline refresh purposes.
$now = gmdate("Y-m-d H:i:s");
$this->_addSql("UPDATE cc_show_instances SET created = '$now'");
$this->_addSql("UPDATE cc_show_instances SET last_scheduled = '$now'");
}
public function down(Schema $schema)