do some output to tell use what we are doing during update process
This commit is contained in:
parent
2682686063
commit
1291835c45
|
@ -1,7 +1,7 @@
|
||||||
--
|
--
|
||||||
-- This updates a 1.29.0 database to 1.30.0
|
-- This updates a 1.29.0 database to 1.30.0
|
||||||
--
|
--
|
||||||
|
SELECT 'Checking for SaveJPEGs in Monitors';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
@ -16,6 +16,7 @@ SET @s = (SELECT IF(
|
||||||
PREPARE stmt FROM @s;
|
PREPARE stmt FROM @s;
|
||||||
EXECUTE stmt;
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
SELECT 'Checking for VideoWriter in Monitors';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
@ -30,6 +31,7 @@ SET @s = (SELECT IF(
|
||||||
PREPARE stmt FROM @s;
|
PREPARE stmt FROM @s;
|
||||||
EXECUTE stmt;
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
SELECT 'Checking for EncoderParameters in Monitors';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
@ -44,6 +46,7 @@ SET @s = (SELECT IF(
|
||||||
PREPARE stmt FROM @s;
|
PREPARE stmt FROM @s;
|
||||||
EXECUTE stmt;
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
SELECT 'Checking for DefaultVideo in Events';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
@ -58,6 +61,7 @@ SET @s = (SELECT IF(
|
||||||
PREPARE stmt FROM @s;
|
PREPARE stmt FROM @s;
|
||||||
EXECUTE stmt;
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
SELECT 'Checking for RecordAudio in Monitors';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
--
|
--
|
||||||
-- Add StateId Column to Events.
|
-- Add StateId Column to Events.
|
||||||
--
|
--
|
||||||
|
SELECT 'Checkfor StateId IN Events';
|
||||||
|
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
-- Update Filters table to have a Concurrent Column
|
-- Update Filters table to have a Concurrent Column
|
||||||
--
|
--
|
||||||
|
|
||||||
|
SELECT 'Checking for Concurrent in Filters';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
-- This adds StorageAreas
|
-- This adds StorageAreas
|
||||||
--
|
--
|
||||||
|
|
||||||
|
SELECT 'Checking For Storage Table';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.TABLES
|
FROM INFORMATION_SCHEMA.TABLES
|
||||||
|
@ -24,6 +25,7 @@ EXECUTE stmt;
|
||||||
-- Add StorageId column to Monitors
|
-- Add StorageId column to Monitors
|
||||||
--
|
--
|
||||||
|
|
||||||
|
SELECT 'Checking For StorageId in Monitors';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
@ -42,6 +44,7 @@ EXECUTE stmt;
|
||||||
-- Add StorageId column to Eventss
|
-- Add StorageId column to Eventss
|
||||||
--
|
--
|
||||||
|
|
||||||
|
SELECT 'Checking For StorageId in Events';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
@ -56,6 +59,7 @@ SET @s = (SELECT IF(
|
||||||
PREPARE stmt FROM @s;
|
PREPARE stmt FROM @s;
|
||||||
EXECUTE stmt;
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
SELECT 'Updating Monitors SETTING StorageId to default';
|
||||||
UPDATE Monitors SET StorageId = 0 WHERE StorageId IS NULL;
|
UPDATE Monitors SET StorageId = 0 WHERE StorageId IS NULL;
|
||||||
ALTER TABLE Monitors MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0;
|
ALTER TABLE Monitors MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0;
|
||||||
UPDATE Events SET StorageId = 0 WHERE StorageId IS NULL;
|
UPDATE Events SET StorageId = 0 WHERE StorageId IS NULL;
|
||||||
|
@ -78,6 +82,7 @@ EXECUTE stmt;
|
||||||
--
|
--
|
||||||
-- Update Monitors table to have an Index on ServerId
|
-- Update Monitors table to have an Index on ServerId
|
||||||
--
|
--
|
||||||
|
SELECT 'Create Index For ServerId on Monitors';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.STATISTICS
|
FROM INFORMATION_SCHEMA.STATISTICS
|
||||||
|
@ -96,6 +101,7 @@ EXECUTE stmt;
|
||||||
--
|
--
|
||||||
-- Update Server table to have an Index on Name
|
-- Update Server table to have an Index on Name
|
||||||
--
|
--
|
||||||
|
SELECT 'Create Index FOR Name on Servers';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.STATISTICS
|
FROM INFORMATION_SCHEMA.STATISTICS
|
||||||
|
@ -111,15 +117,19 @@ PREPARE stmt FROM @s;
|
||||||
EXECUTE stmt;
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
|
||||||
|
SELECT 'ALTER TABLE Logs MODIFY Message TEXT NOT NULL';
|
||||||
-- ALTER TABLE Logs ALTER Message DROP DEFAULT;
|
-- ALTER TABLE Logs ALTER Message DROP DEFAULT;
|
||||||
ALTER TABLE Logs MODIFY Message TEXT NOT NULL;
|
ALTER TABLE Logs MODIFY Message TEXT NOT NULL;
|
||||||
|
|
||||||
|
SELECT 'ALTER TABLE Config MODIFY DefaultValue TEXT';
|
||||||
ALTER TABLE Config MODIFY DefaultValue TEXT;
|
ALTER TABLE Config MODIFY DefaultValue TEXT;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Add an Id column and make it the primary key of the Filters table
|
-- Add an Id column and make it the primary key of the Filters table
|
||||||
--
|
--
|
||||||
|
|
||||||
|
SELECT 'Check for Id column in Filter';
|
||||||
SET @s = (SELECT IF(
|
SET @s = (SELECT IF(
|
||||||
(SELECT COUNT(*)
|
(SELECT COUNT(*)
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
|
Loading…
Reference in New Issue