PostgreSQL Schema
From Eligius
(TODO: explain stuff)
Table users
CREATE TABLE users
(
id serial NOT NULL, username character varying(128) NOT NULL, keyhash bit(160), workername character varying(64),
);
Table hosts
CREATE TABLE hosts
(
id serial NOT NULL, user_id integer, host character varying(128) NOT NULL,
);
Table shares
CREATE TABLE shares
(
server smallint NOT NULL, id bigint NOT NULL, "time" timestamp without time zone NOT NULL, rem_host_id integer NOT NULL, user_id integer NOT NULL, our_result boolean NOT NULL, upstream_result boolean, reason character varying(32), solution bytea NOT NULL, targetmask smallint,
);