storj/pkg/accounting/dbx/accounting.dbx.postgres.sql
Jennifer Li Johnson ad4df839a8
Data at rest accounting database (#601)
* starts at rest storage db

* generates aggregate and granular models with dbx

* reverts gomod

* reverts gosum
2018-11-09 15:02:28 -05:00

20 lines
603 B
SQL

-- AUTOGENERATED BY gopkg.in/spacemonkeygo/dbx.v1
-- DO NOT EDIT
CREATE TABLE aggregates (
node_id text NOT NULL,
start_time timestamp with time zone NOT NULL,
interval bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
PRIMARY KEY ( node_id )
);
CREATE TABLE granulars (
node_id text NOT NULL,
start_time timestamp with time zone NOT NULL,
end_time timestamp with time zone NOT NULL,
data_total bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
PRIMARY KEY ( node_id )
);