diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2022-04-08 14:10:45 +0200 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2022-04-08 14:10:45 +0200 |
commit | 3335f65e5e4b3132a72b46b99e50d3c55c0c58b5 (patch) | |
tree | 23f6e3edb708cc08e0e7a5e1f6a5b912e9af3ff5 /docker/postgres/schema.sql | |
parent | 208089fa95e63d6e29e7a1d86726bfec804de211 (diff) |
Random SQL stuff for handling scanners.
New API endpoint for scanners.
Diffstat (limited to 'docker/postgres/schema.sql')
-rw-r--r-- | docker/postgres/schema.sql | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docker/postgres/schema.sql b/docker/postgres/schema.sql index 38ff863..c6e1323 100644 --- a/docker/postgres/schema.sql +++ b/docker/postgres/schema.sql @@ -25,7 +25,7 @@ SET default_table_access_method = heap; --
CREATE TABLE public.log (
- id integer NOT NULL,
+ id SERIAL PRIMARY KEY,
"timestamp" date NOT NULL,
username text NOT NULL,
logtext text
@@ -39,13 +39,16 @@ ALTER TABLE public.log OWNER TO test; --
CREATE TABLE public.scanner (
- id integer NOT NULL,
+ id SERIAL PRIMARY KEY,
+ runner text DEFAULT '*',
name character varying(128) NOT NULL,
active boolean NOT NULL,
"interval" integer DEFAULT 300 NOT NULL,
starttime date,
endtime date,
- maxruns integer DEFAULT 1
+ maxruns integer DEFAULT 1,
+ hostname character varying(128) NOT NULL,
+ port integer NOT NULL
);
@@ -94,4 +97,3 @@ ALTER TABLE ONLY public.scanner --
-- PostgreSQL database dump complete
--
-
|