From eeebda8d67bfc975f7a3095d539b7806c3a13e39 Mon Sep 17 00:00:00 2001 From: Stefan Midjich Date: Fri, 3 Mar 2017 14:54:49 +0100 Subject: [PATCH] pgsql schema --- tools/captiveportal.pgsql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tools/captiveportal.pgsql diff --git a/tools/captiveportal.pgsql b/tools/captiveportal.pgsql new file mode 100644 index 0000000..3844855 --- /dev/null +++ b/tools/captiveportal.pgsql @@ -0,0 +1,13 @@ +create type if not exists inet_protocol as enum ('tcp', 'udp'); + +create table if not exists client ( +client_id uuid NOT NULL primary key unique, +created timestamp NOT NULL, +ip_address inet NOT NULL, +"protocol" inet_protocol NOT NULL, +enabled boolean NOT NULL, +last_packets bigint default 0, +last_activity timestamp +); + +create index if not exists client_ip_address_index on client (ip_address);