blob: 3840b431677d959634cc7ce87d67e285b48c243c [file] [log] [blame]
Michael Mokry110b8012019-06-19 10:21:18 -05001use operationshistory;
2
3create table if not exists operationshistory (
4 id int(11) not null auto_increment,
5 closedLoopName varchar(255) not null,
6 requestId varchar(50),
7 actor varchar(50) not null,
8 operation varchar(50) not null,
9 target varchar(50) not null,
10 starttime timestamp not null,
11 outcome varchar(50) not null,
12 message varchar(255),
13 subrequestId varchar(50),
14 endtime timestamp not null default current_timestamp,
15 PRIMARY KEY (id)
16);
17
Jim Hahn9e236be2021-05-25 09:06:50 -040018create index if not exists operationshistory_clreqid_index on
19 operationshistory(requestId, closedLoopName);
20
21create index if not exists operationshistory_target_index on
22 operationshistory(target, operation, actor, endtime);
23
Michael Mokry110b8012019-06-19 10:21:18 -050024insert into operationshistory (`closedLoopName`,`requestId`,`actor`,`operation`,`target`,`starttime`,`outcome`,`message`,`subrequestId`,`endtime`)
25VALUES('ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3','test001122','SO','VF Module Create','.*',NOW() - INTERVAL 1 HOUR,'SUCCESS',null,null,Now());