diff options
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -66,6 +66,42 @@ CREATE TABLE public.entsoe ( -- +-- Name: mqtt_temps; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.mqtt_temps ( + id integer NOT NULL, + name text NOT NULL, + temperature real, + humidity real, + battery smallint, + linkquality smallint, + voltage integer, + "time" timestamp with time zone DEFAULT now() NOT NULL +); + + +-- +-- Name: mqtt_temps_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.mqtt_temps_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: mqtt_temps_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.mqtt_temps_id_seq OWNED BY public.mqtt_temps.id; + + +-- -- Name: nbex; Type: TABLE; Schema: public; Owner: - -- @@ -164,6 +200,13 @@ CREATE TABLE public.yr ( -- +-- Name: mqtt_temps id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.mqtt_temps ALTER COLUMN id SET DEFAULT nextval('public.mqtt_temps_id_seq'::regclass); + + +-- -- Name: neohub id; Type: DEFAULT; Schema: public; Owner: - -- @@ -195,6 +238,14 @@ ALTER TABLE ONLY public.entsoe -- +-- Name: mqtt_temps mqtt_temps_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.mqtt_temps + ADD CONSTRAINT mqtt_temps_pkey PRIMARY KEY (id); + + +-- -- Name: nbex nbexchange_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- |