   STATUS_ID varchar(255),
   PROCESS_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE DEFAULT NOW() ON UPDATE NOW(),
+  TIME_OF_STATE_CHANGE TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
   REASON LONGTEXT,
   PRIMARY KEY (STATUS_ID, PROCESS_ID),
   FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE

  STATUS_ID varchar(255),
  TASK_ID varchar(255),
  STATE varchar(255),
  TIME_OF_STATE_CHANGE DEFAULT NOW() ON UPDATE NOW(),
  REASON LONGTEXT,
  PRIMARY KEY (STATUS_ID, TASK_ID),
  FOREIGN KEY (TASK_ID) REFERENCES TASK(TASK_ID) ON DELETE CASCADE

  JOB_ID varchar(255),
  TASK_ID varchar(255),
  STATE varchar(255),
  TIME_OF_STATE_CHANGE TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
  REASON LONGTEXT,
  PRIMARY KEY (STATUS_ID, JOB_ID, TASK_ID),
  FOREIGN KEY (JOB_ID, TASK_ID) REFERENCES JOB(JOB_ID, TASK_ID) ON DELETE CASCADE
