d4e4aee2346c8b27d8c86197203c560ca9f9b464
[policy/docker.git] /
1 /*
2 *  ============LICENSE_START=======================================================
3 *  Copyright (C) 2024 Nordix Foundation.
4 *  ================================================================================
5 *  Licensed under the Apache License, Version 2.0 (the "License");
6 *  you may not use this file except in compliance with the License.
7 *  You may obtain a copy of the License at
8 *
9 *       http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 *  ============LICENSE_END=========================================================
17 */
18
19 CREATE TABLE operationshistory (
20     id BIGINT NOT NULL,
21     closedLoopName VARCHAR(255),
22     requestId VARCHAR(50),
23     subrequestId VARCHAR(50),
24     actor VARCHAR(50),
25     operation VARCHAR(50),
26     target VARCHAR(50),
27     starttime DATETIME,
28     outcome VARCHAR(50),
29     message VARCHAR(255),
30     endtime DATETIME,
31     PRIMARY KEY (id)
32 );
33
34 CREATE INDEX operationshistory_clreqid_index ON operationshistory (requestId, closedLoopName);
35 CREATE INDEX operationshistory_target_index ON operationshistory (target, operation, actor, endtime);
36