diff options
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 95 |
1 files changed, 67 insertions, 28 deletions
@@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1) --- Dumped by pg_dump version 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1) +-- Dumped from database version 14.6 (Ubuntu 14.6-0ubuntu0.22.04.1) +-- Dumped by pg_dump version 14.6 (Ubuntu 14.6-0ubuntu0.22.04.1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -21,7 +21,7 @@ SET default_tablespace = ''; SET default_table_access_method = heap; -- --- Name: elvia; Type: TABLE; Schema: public; Owner: dennis +-- Name: elvia; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.elvia ( @@ -35,10 +35,8 @@ CREATE TABLE public.elvia ( ); -ALTER TABLE public.elvia OWNER TO dennis; - -- --- Name: elvia_gridtariff; Type: TABLE; Schema: public; Owner: dennis +-- Name: elvia_gridtariff; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.elvia_gridtariff ( @@ -53,10 +51,8 @@ CREATE TABLE public.elvia_gridtariff ( ); -ALTER TABLE public.elvia_gridtariff OWNER TO dennis; - -- --- Name: entsoe; Type: TABLE; Schema: public; Owner: dennis +-- Name: entsoe; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.entsoe ( @@ -69,10 +65,8 @@ CREATE TABLE public.entsoe ( ); -ALTER TABLE public.entsoe OWNER TO dennis; - -- --- Name: nbex; Type: TABLE; Schema: public; Owner: dennis +-- Name: nbex; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.nbex ( @@ -84,10 +78,46 @@ CREATE TABLE public.nbex ( ); -ALTER TABLE public.nbex OWNER TO dennis; +-- +-- Name: neohub; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.neohub ( + id integer NOT NULL, + "timestamp" timestamp with time zone DEFAULT now() NOT NULL, + "time" time without time zone, + device_id smallint, + away boolean, + heat_mode boolean, + heat_on boolean NOT NULL, + current_floor_temperature real, + target_temperature real, + temperature real +); + -- --- Name: tibber_consumption; Type: TABLE; Schema: public; Owner: dennis +-- Name: neohub_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.neohub_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: neohub_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.neohub_id_seq OWNED BY public.neohub.id; + + +-- +-- Name: tibber_consumption; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.tibber_consumption ( @@ -102,10 +132,8 @@ CREATE TABLE public.tibber_consumption ( ); -ALTER TABLE public.tibber_consumption OWNER TO dennis; - -- --- Name: tibber_prices; Type: TABLE; Schema: public; Owner: dennis +-- Name: tibber_prices; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.tibber_prices ( @@ -118,10 +146,8 @@ CREATE TABLE public.tibber_prices ( ); -ALTER TABLE public.tibber_prices OWNER TO dennis; - -- --- Name: yr; Type: TABLE; Schema: public; Owner: dennis +-- Name: yr; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.yr ( @@ -137,10 +163,15 @@ CREATE TABLE public.yr ( ); -ALTER TABLE public.yr OWNER TO dennis; +-- +-- Name: neohub id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.neohub ALTER COLUMN id SET DEFAULT nextval('public.neohub_id_seq'::regclass); + -- --- Name: elvia el_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis +-- Name: elvia el_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.elvia @@ -148,7 +179,7 @@ ALTER TABLE ONLY public.elvia -- --- Name: elvia_gridtariff elvia_gridtariff_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis +-- Name: elvia_gridtariff elvia_gridtariff_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.elvia_gridtariff @@ -156,7 +187,7 @@ ALTER TABLE ONLY public.elvia_gridtariff -- --- Name: entsoe entsoe_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis +-- Name: entsoe entsoe_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.entsoe @@ -164,7 +195,7 @@ ALTER TABLE ONLY public.entsoe -- --- Name: nbex nbexchange_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis +-- Name: nbex nbexchange_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.nbex @@ -172,7 +203,15 @@ ALTER TABLE ONLY public.nbex -- --- Name: tibber_consumption tibber_consumption_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis +-- Name: neohub neohub_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.neohub + ADD CONSTRAINT neohub_pkey PRIMARY KEY (id); + + +-- +-- Name: tibber_consumption tibber_consumption_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tibber_consumption @@ -180,7 +219,7 @@ ALTER TABLE ONLY public.tibber_consumption -- --- Name: tibber_prices tibber_prices_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis +-- Name: tibber_prices tibber_prices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tibber_prices @@ -188,7 +227,7 @@ ALTER TABLE ONLY public.tibber_prices -- --- Name: yr yr_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis +-- Name: yr yr_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.yr |