-- UPDATE SCRIOT FOR CLIENT SCHEMA
-- This script will set any null UpdateTimes to now
-- and then explicitly set the UpdateTimes of 
-- future rows to update

UPDATE JobRecords SET UpdateTime = CURRENT_TIMESTAMP WHERE UpdateTime IS NULL;
ALTER TABLE JobRecords MODIFY COLUMN UpdateTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;

UPDATE SuperSummaries SET UpdateTime = CURRENT_TIMESTAMP WHERE UpdateTime IS NULL;
ALTER TABLE SuperSummaries MODIFY COLUMN UpdateTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;

UPDATE LastUpdated SET UpdateTime = CURRENT_TIMESTAMP WHERE UpdateTime IS NULL;
ALTER TABLE LastUpdated MODIFY COLUMN UpdateTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;

Add update script for timestamps in client schema
Add update script for timestamps in client schema

- provide a script to apply timestamp schema changes to all ready
  deployed instances. Because we are changing a column to NOT NULL
  we need to define a default, the current time was chosen as this default.
- Sets it so that any future entries will explicitly get the UpdateTime set
- MySQL 5.1 did this implicitly, MySQL 5.6+ does not
