 -- Copy data into the job node table
 --
 DROP PROCEDURE IF EXISTS add_col_to_stat_val_src;
+DROP PROCEDURE IF EXISTS add_id_to_stat_val_src;
 DELIMITER //
 CREATE PROCEDURE add_col_to_stat_val_src ()
 BEGIN

    MODIFY COLUMN CT BIGINT(20) NOT NULL;

END//
DELIMITER ;
CALL add_col_to_stat_val_src();
DROP PROCEDURE add_col_to_stat_val_src;

SET SQL_NOTES=@OLD_SQL_NOTES;

-- Table structure for table sql_stat_val (idempotent)
--
CREATE TABLE IF NOT EXISTS SQL_STAT_VAL (
  TIME_MS               bigint(20) NOT NULL,
  PRES                  tinyint(4) NOT NULL,
  VAL_TP                tinyint(4) NOT NULL,
  VAL                   double     NOT NULL,
  CT                    bigint(20) NOT NULL,
  FK_SQL_STAT_KEY_ID    bigint(20) NOT NULL,
  PRIMARY KEY (FK_SQL_STAT_KEY_ID, TIME_MS, VAL_TP, PRES),
  CONSTRAINT 			SQL_STAT_VAL_FK_STAT_KEY_ID
      FOREIGN KEY (FK_SQL_STAT_KEY_ID)
