2020-06-10 11:14:12 +02:00
|
|
|
ALTER TABLE project ADD COLUMN IF NOT EXISTS registry_id int;
|
2020-06-22 04:34:03 +02:00
|
|
|
ALTER TABLE IF EXISTS cve_whitelist RENAME TO cve_allowlist;
|
2020-06-08 05:35:18 +02:00
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS execution (
|
|
|
|
id SERIAL NOT NULL,
|
|
|
|
vendor_type varchar(16) NOT NULL,
|
|
|
|
vendor_id int,
|
|
|
|
status varchar(16),
|
|
|
|
status_message text,
|
|
|
|
trigger varchar(16) NOT NULL,
|
|
|
|
extra_attrs JSON,
|
|
|
|
start_time timestamp DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
end_time timestamp,
|
|
|
|
PRIMARY KEY (id)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS task (
|
|
|
|
id SERIAL PRIMARY KEY NOT NULL,
|
|
|
|
execution_id int NOT NULL,
|
|
|
|
job_id varchar(64),
|
|
|
|
status varchar(16) NOT NULL,
|
|
|
|
status_code int NOT NULL,
|
|
|
|
status_revision int,
|
|
|
|
status_message text,
|
|
|
|
run_count int,
|
|
|
|
extra_attrs JSON,
|
|
|
|
creation_time timestamp DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
start_time timestamp,
|
|
|
|
update_time timestamp,
|
|
|
|
end_time timestamp,
|
|
|
|
FOREIGN KEY (execution_id) REFERENCES execution(id)
|
|
|
|
);
|
2020-06-02 06:25:24 +02:00
|
|
|
|
|
|
|
ALTER TABLE blob ADD COLUMN IF NOT EXISTS update_time timestamp default CURRENT_TIMESTAMP;
|
|
|
|
ALTER TABLE blob ADD COLUMN IF NOT EXISTS status varchar(255);
|
|
|
|
ALTER TABLE blob ADD COLUMN IF NOT EXISTS version BIGINT default 0;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_status ON blob (status);
|
2020-06-29 07:16:29 +02:00
|
|
|
CREATE INDEX IF NOT EXISTS idx_version ON blob (version);
|
|
|
|
|
2020-06-26 19:06:47 +02:00
|
|
|
CREATE TABLE p2p_preheat_instance (
|
|
|
|
id SERIAL PRIMARY KEY NOT NULL,
|
|
|
|
name varchar(255) NOT NULL,
|
|
|
|
description varchar(255),
|
|
|
|
vendor varchar(255) NOT NULL,
|
|
|
|
endpoint varchar(255) NOT NULL,
|
|
|
|
auth_mode varchar(255),
|
|
|
|
auth_data text,
|
|
|
|
enabled boolean,
|
|
|
|
is_default boolean,
|
|
|
|
insecure boolean,
|
|
|
|
setup_timestamp int
|
|
|
|
);
|
|
|
|
|
2020-06-29 07:16:29 +02:00
|
|
|
CREATE TABLE IF NOT EXISTS p2p_preheat_policy (
|
|
|
|
id SERIAL PRIMARY KEY NOT NULL,
|
|
|
|
name varchar(255) NOT NULL,
|
|
|
|
description varchar(1024),
|
|
|
|
project_id int NOT NULL,
|
|
|
|
provider_id int NOT NULL,
|
|
|
|
filters varchar(1024),
|
|
|
|
trigger varchar(16),
|
|
|
|
enabled boolean,
|
|
|
|
creation_time timestamp,
|
|
|
|
update_time timestamp
|
|
|
|
);
|