From e58dc713bef769c55efb42a76b6e058c28122bf4 Mon Sep 17 00:00:00 2001
From: Dennis Eriksen <d@ennis.no>
Date: Wed, 14 Sep 2022 12:35:43 +0200
Subject: Adding Entsoe as a data source. Also adding Norges Bank, since
 Entsoes prices are in Euros, and I need an exchange-rate.

---
 schema.sql | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 6b20b52..89d8e77 100644
--- a/schema.sql
+++ b/schema.sql
@@ -37,6 +37,37 @@ CREATE TABLE public.elvia (
 
 ALTER TABLE public.elvia OWNER TO dennis;
 
+--
+-- Name: entsoe; Type: TABLE; Schema: public; Owner: dennis
+--
+
+CREATE TABLE public.entsoe (
+    starttime timestamp with time zone NOT NULL,
+    zone character varying(4) NOT NULL,
+    price numeric NOT NULL,
+    currency character varying(4) DEFAULT 'EUR'::character varying NOT NULL,
+    unitmeasure character varying(4) DEFAULT 'MWH'::character varying NOT NULL,
+    inserted timestamp with time zone DEFAULT now() NOT NULL
+);
+
+
+ALTER TABLE public.entsoe OWNER TO dennis;
+
+--
+-- Name: nbex; Type: TABLE; Schema: public; Owner: dennis
+--
+
+CREATE TABLE public.nbex (
+    startdate date NOT NULL,
+    base_cur character varying(3) DEFAULT 'EUR'::character varying NOT NULL,
+    quote_cur character varying(3) DEFAULT 'NOK'::character varying NOT NULL,
+    rate numeric NOT NULL,
+    inserted timestamp with time zone DEFAULT now() NOT NULL
+);
+
+
+ALTER TABLE public.nbex OWNER TO dennis;
+
 --
 -- Name: tibber_consumption; Type: TABLE; Schema: public; Owner: dennis
 --
@@ -98,6 +129,22 @@ ALTER TABLE ONLY public.elvia
     ADD CONSTRAINT el_pkey PRIMARY KEY (starttime, endtime);
 
 
+--
+-- Name: entsoe entsoe_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis
+--
+
+ALTER TABLE ONLY public.entsoe
+    ADD CONSTRAINT entsoe_pkey PRIMARY KEY (starttime, zone);
+
+
+--
+-- Name: nbex nbexchange_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis
+--
+
+ALTER TABLE ONLY public.nbex
+    ADD CONSTRAINT nbexchange_pkey PRIMARY KEY (startdate, base_cur, quote_cur);
+
+
 --
 -- Name: tibber_consumption tibber_consumption_pkey; Type: CONSTRAINT; Schema: public; Owner: dennis
 --
-- 
cgit v1.2.3

