From 3335f65e5e4b3132a72b46b99e50d3c55c0c58b5 Mon Sep 17 00:00:00 2001
From: Kristofer Hallin <kristofer@sunet.se>
Date: Fri, 8 Apr 2022 14:10:45 +0200
Subject: Random SQL stuff for handling scanners. New API endpoint for
 scanners.

---
 docker/postgres/schema.sql | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'docker/postgres/schema.sql')

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
 --
-
-- 
cgit v1.1

