create table if not exists file_object
(
key varchar(32) not null primary key,
mime_type varchar(64),
data bytea
);
create table if not exists download
(
key varchar(32) not null references file_object(key),
ip_address varchar(32),
user_agent varchar(128),
time timestamp
);