Skip to content

Instantly share code, notes, and snippets.

@ijunaid8989
Created December 16, 2015 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijunaid8989/783c5d8f959ee8fb2b2c to your computer and use it in GitHub Desktop.
Save ijunaid8989/783c5d8f959ee8fb2b2c to your computer and use it in GitHub Desktop.
CREATE TABLE cameras
(
id integer NOT NULL DEFAULT nextval('sq_streams'::regclass),
created_at timestamp with time zone NOT NULL DEFAULT now(),
updated_at timestamp with time zone NOT NULL DEFAULT now(),
exid text NOT NULL,
owner_id integer NOT NULL,
is_public boolean NOT NULL,
config json NOT NULL,
name text NOT NULL,
last_polled_at timestamp with time zone DEFAULT now(),
is_online boolean,
timezone text,
last_online_at timestamp with time zone DEFAULT now(),
location geography(Point,4326),
mac_address macaddr,
model_id integer,
discoverable boolean NOT NULL DEFAULT false,
preview bytea,
thumbnail_url text,
CONSTRAINT pk_streams PRIMARY KEY (id)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment