From 73e9a1a027b2226e36ca39a8afac9a3dd942769a Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Apr 2012 16:21:29 +0200 Subject: [PATCH 1/3] CC-3684 : Upgraded database not equivalent to fresh install database part 2 --- .../common/Version20120411102907.php | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/install_minimal/upgrades/airtime-2.1.0/common/Version20120411102907.php b/install_minimal/upgrades/airtime-2.1.0/common/Version20120411102907.php index a1b9c32f4..6e4bb3c6c 100644 --- a/install_minimal/upgrades/airtime-2.1.0/common/Version20120411102907.php +++ b/install_minimal/upgrades/airtime-2.1.0/common/Version20120411102907.php @@ -14,18 +14,26 @@ class Version20120411102907 extends AbstractMigration */ public function up(Schema $schema) { - $this->_addSql("ALTER TABLE cc_files ALTER COLUMN length TYPE interval DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_files ALTER COLUMN length TYPE interval"); + $this->_addSql("ALTER TABLE cc_files ALTER COLUMN length SET DEFAULT '00:00:00'::interval"); $this->_addSql("ALTER TABLE cc_files ALTER COLUMN file_exists DROP NOT NULL"); - $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cuein TYPE interval DEFAULT '00:00:00'"); - $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cueout TYPE interval DEFAULT '00:00:00'"); - $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cliplength TYPE interval DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cuein TYPE interval"); + $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cuein SET DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cueout TYPE interval"); + $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cueout SET DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cliplength TYPE interval"); + $this->_addSql("ALTER TABLE cc_playlistcontents ALTER COLUMN cliplength SET DEFAULT '00:00:00'"); - $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN cue_in TYPE interval DEFAULT '00:00:00'"); - $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN cue_out TYPE interval DEFAULT '00:00:00'"); - $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN clip_length TYPE interval DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN cue_in TYPE interval"); + $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN cue_in SET DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN cue_out TYPE interval"); + $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN cue_out SET DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN clip_length TYPE interval"); + $this->_addSql("ALTER TABLE cc_schedule ALTER COLUMN clip_length SET DEFAULT '00:00:00'"); - $this->_addSql("ALTER TABLE cc_show_instances ALTER COLUMN time_filled TYPE interval DEFAULT '00:00:00'"); + $this->_addSql("ALTER TABLE cc_show_instances ALTER COLUMN time_filled TYPE interval"); + $this->_addSql("ALTER TABLE cc_show_instances ALTER COLUMN time_filled set DEFAULT '00:00:00'"); //remove old columns from cc_schedule that deal with groups or playlists. $this->_addSql("ALTER TABLE cc_schedule DROP COLUMN group_id"); From 0d537d05acd6b54c8c3eab61390a69beeb2b1d3e Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Apr 2012 16:51:12 +0200 Subject: [PATCH 2/3] CC-3684 : Upgraded database not equivalent to fresh install database part 2 --- .../upgrades/airtime-2.1.0/common/Version20120411174904.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install_minimal/upgrades/airtime-2.1.0/common/Version20120411174904.php b/install_minimal/upgrades/airtime-2.1.0/common/Version20120411174904.php index 0ad900353..3c5891c99 100644 --- a/install_minimal/upgrades/airtime-2.1.0/common/Version20120411174904.php +++ b/install_minimal/upgrades/airtime-2.1.0/common/Version20120411174904.php @@ -15,6 +15,8 @@ class Version20120411174904 extends AbstractMigration $this->_addSql("ALTER TABLE cc_show_instances ADD created timestamp"); $this->_addSql("ALTER TABLE cc_show_instances ALTER COLUMN created SET NOT NULL"); + $this->_addSql("ALTER TABLE cc_show_instances ADD last_scheduled timestamp"); + //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'"); From 8020ae0a2928cf168266893267ab05e1848580c4 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Apr 2012 17:21:59 +0200 Subject: [PATCH 3/3] CC-3688 : Make sure timeline knows to refresh itself when a rebroadcast file has been scheduled forgot I commented out the check when fixing something in the past.... --- airtime_mvc/public/js/airtime/showbuilder/main_builder.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index 60c8bdf7f..6e46477bf 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -206,7 +206,6 @@ AIRTIME = (function(AIRTIME) { } }); - /* //check if the timeline viewed needs updating. setInterval(function(){ var data = {}, @@ -238,7 +237,7 @@ AIRTIME = (function(AIRTIME) { } ); }, 5 * 1000); //need refresh in milliseconds - */ + }; mod.onResize = function() {