diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index e9f0ca9ab..26d31dd2f 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -496,7 +496,6 @@ CREATE TABLE `Monitors` ( `TrackDelay` smallint(5) unsigned, `ReturnLocation` tinyint(3) NOT NULL default '-1', `ReturnDelay` smallint(5) unsigned, - `DefaultView` enum('Events','Control') NOT NULL default 'Events', `DefaultRate` smallint(5) unsigned NOT NULL default '100', `DefaultScale` smallint(5) unsigned NOT NULL default '100', `SignalCheckPoints` INT UNSIGNED NOT NULL default '0', diff --git a/db/zm_update-1.33.0.sql b/db/zm_update-1.33.0.sql index ebf6573a7..624d254eb 100644 --- a/db/zm_update-1.33.0.sql +++ b/db/zm_update-1.33.0.sql @@ -1,6 +1,21 @@ -- -- This updates a 1.32.3 database to 1.33.0 -- --- No changes required +-- +-- Remove DefaultView from Monitors table. -- +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'DefaultView' + ) > 0, +"ALTER TABLE Monitors DROP COLUMN DefaultView" +"SELECT 'Column DefaultView no longer exists in Monitors'", +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 72d8a0aca..dfc96b547 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -113,7 +113,6 @@ if ( ! $monitor ) { 'FPSReportInterval' => 100, 'RefBlendPerc' => 6, 'AlarmRefBlendPerc' => 6, - 'DefaultView' => 'Events', 'DefaultRate' => '100', 'DefaultScale' => '100', 'SignalCheckPoints' => '10', @@ -657,7 +656,6 @@ if ( $tab != 'misc' ) { - @@ -1010,17 +1008,6 @@ if ( $monitor->Type() == 'Local' ) {