2018-12-05 09:35:50 +00:00
|
|
|
-- AUTOGENERATED BY gopkg.in/spacemonkeygo/dbx.v1
|
|
|
|
-- DO NOT EDIT
|
2018-12-18 17:18:42 +00:00
|
|
|
CREATE TABLE accounting_raws (
|
|
|
|
id bigserial NOT NULL,
|
|
|
|
node_id text NOT NULL,
|
|
|
|
interval_end_time timestamp with time zone NOT NULL,
|
|
|
|
data_total bigint NOT NULL,
|
|
|
|
data_type integer NOT NULL,
|
|
|
|
created_at timestamp with time zone NOT NULL,
|
|
|
|
updated_at timestamp with time zone NOT NULL,
|
|
|
|
PRIMARY KEY ( id )
|
|
|
|
);
|
|
|
|
CREATE TABLE accounting_rollups (
|
|
|
|
id bigserial NOT NULL,
|
|
|
|
node_id text NOT NULL,
|
|
|
|
start_time timestamp with time zone NOT NULL,
|
|
|
|
interval bigint NOT NULL,
|
|
|
|
data_type integer NOT NULL,
|
|
|
|
created_at timestamp with time zone NOT NULL,
|
|
|
|
updated_at timestamp with time zone NOT NULL,
|
|
|
|
PRIMARY KEY ( id )
|
|
|
|
);
|
|
|
|
CREATE TABLE accounting_timestamps (
|
|
|
|
name text NOT NULL,
|
|
|
|
value timestamp with time zone NOT NULL,
|
|
|
|
PRIMARY KEY ( name )
|
|
|
|
);
|
2018-12-07 09:59:31 +00:00
|
|
|
CREATE TABLE bwagreements (
|
|
|
|
signature bytea NOT NULL,
|
|
|
|
data bytea NOT NULL,
|
|
|
|
created_at timestamp with time zone NOT NULL,
|
|
|
|
PRIMARY KEY ( signature )
|
2018-12-05 09:35:50 +00:00
|
|
|
);
|
2018-12-10 19:08:45 +00:00
|
|
|
CREATE TABLE irreparabledbs (
|
|
|
|
segmentpath bytea NOT NULL,
|
|
|
|
segmentdetail bytea NOT NULL,
|
|
|
|
pieces_lost_count bigint NOT NULL,
|
|
|
|
seg_damaged_unix_sec bigint NOT NULL,
|
|
|
|
repair_attempt_count bigint NOT NULL,
|
|
|
|
PRIMARY KEY ( segmentpath )
|
|
|
|
);
|
2018-12-14 20:17:30 +00:00
|
|
|
CREATE TABLE nodes (
|
|
|
|
id bytea NOT NULL,
|
|
|
|
audit_success_count bigint NOT NULL,
|
|
|
|
total_audit_count bigint NOT NULL,
|
|
|
|
audit_success_ratio double precision NOT NULL,
|
|
|
|
uptime_success_count bigint NOT NULL,
|
|
|
|
total_uptime_count bigint NOT NULL,
|
|
|
|
uptime_ratio double precision NOT NULL,
|
|
|
|
created_at timestamp with time zone NOT NULL,
|
|
|
|
updated_at timestamp with time zone NOT NULL,
|
|
|
|
PRIMARY KEY ( id )
|
|
|
|
);
|
2018-12-17 20:14:16 +00:00
|
|
|
CREATE TABLE overlay_cache_nodes (
|
|
|
|
key bytea NOT NULL,
|
|
|
|
value bytea NOT NULL,
|
|
|
|
PRIMARY KEY ( key ),
|
|
|
|
UNIQUE ( key )
|
|
|
|
);
|