CREATE TABLE blocks (
block_id character(24) NOT NULL,
user_id character(24) NOT NULL,
created timestamp with time zone,
locale character varying,
shared boolean,
private boolean,
moment_type character varying NOT NULL,
user_agent character varying,
inserted timestamp without time zone NOT NULL DEFAULT now(),
networks character varying[],
lnglat point,
timezone character varying,
geohash character varying(20),
CONSTRAINT blocks_pkey PRIMARY KEY (block_id )
) WITH ( OIDS=FALSE );
CREATE INDEX blocks_created_at_timezone_idx ON blocks USING btree (timezone(timezone::text, created) );
CREATE INDEX blocks_created_idx ON blocks USING btree (created DESC NULLS LAST);
CREATE INDEX blocks_geohash_idx ON blocks USING btree (geohash );
CREATE INDEX blocks_timezone_idx ON blocks USING btree (timezone );
CREATE INDEX blocks_user_id_idx ON blocks USING btree (user_id );