summaryrefslogtreecommitdiff
path: root/docker/postgres
diff options
context:
space:
mode:
authorKristofer Hallin <kristofer@sunet.se>2022-04-08 14:10:45 +0200
committerKristofer Hallin <kristofer@sunet.se>2022-04-08 14:10:45 +0200
commit3335f65e5e4b3132a72b46b99e50d3c55c0c58b5 (patch)
tree23f6e3edb708cc08e0e7a5e1f6a5b912e9af3ff5 /docker/postgres
parent208089fa95e63d6e29e7a1d86726bfec804de211 (diff)
Random SQL stuff for handling scanners.
New API endpoint for scanners.
Diffstat (limited to 'docker/postgres')
-rw-r--r--docker/postgres/schema.sql10
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
--
-