2017-03-06 08:29:01 +00:00
|
|
|
create type inet_protocol as enum ('tcp', 'udp');
|
2017-03-03 13:54:49 +00:00
|
|
|
|
|
|
|
create table if not exists client (
|
2017-03-03 14:12:19 +00:00
|
|
|
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
|
2017-03-03 13:54:49 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
create index if not exists client_ip_address_index on client (ip_address);
|