6642f97142
* tallies up data stored on each node in pointerdb * adds comments for data type enums * changes Open to BeginTx because Go convention * removes online status check from identify active nodes * changes identifyactivenodes to calculatestaticdata * updates accounting dbx names
28 lines
767 B
SQL
28 lines
767 B
SQL
-- AUTOGENERATED BY gopkg.in/spacemonkeygo/dbx.v1
|
|
-- DO NOT EDIT
|
|
CREATE TABLE 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 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 timestamps (
|
|
name text NOT NULL,
|
|
value timestamp with time zone NOT NULL,
|
|
PRIMARY KEY ( name )
|
|
);
|