pgsql schema

This commit is contained in:
Stefan Midjich 2017-03-03 14:54:49 +01:00
parent b79d0f631d
commit eeebda8d67
1 changed files with 13 additions and 0 deletions

13
tools/captiveportal.pgsql Normal file
View File

@ -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);