2019-06-19 14:51:08 +02:00
|
|
|
/* add table for CVE whitelist */
|
|
|
|
CREATE TABLE cve_whitelist (
|
|
|
|
id SERIAL PRIMARY KEY NOT NULL,
|
|
|
|
project_id int,
|
|
|
|
creation_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
update_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
expires_at bigint,
|
|
|
|
items text NOT NULL,
|
|
|
|
UNIQUE (project_id)
|
2019-07-16 09:56:53 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
create table retention_policy
|
|
|
|
(
|
|
|
|
id serial PRIMARY KEY NOT NULL,
|
|
|
|
scope_level varchar(20),
|
|
|
|
scope_reference integer,
|
|
|
|
trigger_kind varchar(20),
|
|
|
|
data text,
|
|
|
|
create_time time,
|
|
|
|
update_time time
|
|
|
|
);
|
|
|
|
|
|
|
|
create table retention_execution
|
|
|
|
(
|
2019-07-24 11:22:26 +02:00
|
|
|
id serial PRIMARY KEY NOT NULL,
|
2019-07-16 09:56:53 +02:00
|
|
|
policy_id integer,
|
|
|
|
status varchar(20),
|
2019-07-24 11:22:26 +02:00
|
|
|
dry_run boolean,
|
2019-07-16 09:56:53 +02:00
|
|
|
trigger varchar(20),
|
|
|
|
total integer,
|
|
|
|
succeed integer,
|
|
|
|
failed integer,
|
|
|
|
in_progress integer,
|
|
|
|
stopped integer,
|
2019-07-24 11:22:26 +02:00
|
|
|
start_time timestamp,
|
|
|
|
end_time timestamp
|
2019-07-16 09:56:53 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
create table retention_task
|
|
|
|
(
|
2019-07-23 03:40:37 +02:00
|
|
|
id SERIAL NOT NULL,
|
2019-07-16 09:56:53 +02:00
|
|
|
execution_id integer,
|
2019-07-23 03:40:37 +02:00
|
|
|
status varchar(32),
|
|
|
|
start_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
end_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
PRIMARY KEY (id)
|
2019-07-16 09:56:53 +02:00
|
|
|
);
|
|
|
|
|
2019-07-19 13:44:11 +02:00
|
|
|
create table schedule
|
2019-07-16 09:56:53 +02:00
|
|
|
(
|
2019-07-19 13:44:11 +02:00
|
|
|
id SERIAL NOT NULL,
|
|
|
|
job_id varchar(64),
|
|
|
|
status varchar(64),
|
|
|
|
creation_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
update_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
PRIMARY KEY (id)
|
2019-07-16 09:56:53 +02:00
|
|
|
);
|