bdd
This commit is contained in:
parent
e4a4620511
commit
c8a9a83c18
@ -3,7 +3,6 @@ package com.example.starter;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import io.vertx.sqlclient.Tuple;
|
||||
import io.vertx.sqlclient.data.Numeric;
|
||||
|
||||
public class SetWeatherData {
|
||||
private DatabaseService databaseService;
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="./src/img/cloud-alert.svg"/>
|
||||
<title>Projet Dev Web</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
1
Front-end/src/img/cloud-alert.svg
Normal file
1
Front-end/src/img/cloud-alert.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud-alert-icon lucide-cloud-alert"><path d="M12 12v4"/><path d="M12 20h.01"/><path d="M17 18h.5a1 1 0 0 0 0-9h-1.79A7 7 0 1 0 7 17.708"/></svg>
|
||||
|
After Width: | Height: | Size: 347 B |
318
sql/export.sql
Normal file
318
sql/export.sql
Normal file
@ -0,0 +1,318 @@
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
-- Dumped from database version 17.4
|
||||
-- Dumped by pg_dump version 17.4
|
||||
|
||||
-- Started on 2025-04-08 10:16:23
|
||||
|
||||
SET statement_timeout = 0;
|
||||
SET lock_timeout = 0;
|
||||
SET idle_in_transaction_session_timeout = 0;
|
||||
SET transaction_timeout = 0;
|
||||
SET client_encoding = 'UTF8';
|
||||
SET standard_conforming_strings = on;
|
||||
SELECT pg_catalog.set_config('search_path', '', false);
|
||||
SET check_function_bodies = false;
|
||||
SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
SET default_tablespace = '';
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- TOC entry 222 (class 1259 OID 32768)
|
||||
-- Name: range_data; Type: TABLE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE TABLE public.range_data (
|
||||
station_id integer NOT NULL,
|
||||
temperature_min numeric,
|
||||
temperature_max numeric,
|
||||
pressure_min numeric,
|
||||
pressure_max numeric,
|
||||
humidity_min numeric,
|
||||
humidity_max numeric
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.range_data OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- TOC entry 221 (class 1259 OID 16479)
|
||||
-- Name: weather_data; Type: TABLE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE TABLE public.weather_data (
|
||||
id integer NOT NULL,
|
||||
station_id integer NOT NULL,
|
||||
temperature numeric(5,2),
|
||||
humidity numeric(5,2),
|
||||
pressure numeric(7,2),
|
||||
wind_speed numeric(5,2),
|
||||
wind_direction character varying(50),
|
||||
"timestamp" timestamp without time zone DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.weather_data OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- TOC entry 220 (class 1259 OID 16478)
|
||||
-- Name: weather_data_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.weather_data_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER SEQUENCE public.weather_data_id_seq OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- TOC entry 4921 (class 0 OID 0)
|
||||
-- Dependencies: 220
|
||||
-- Name: weather_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.weather_data_id_seq OWNED BY public.weather_data.id;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 219 (class 1259 OID 16468)
|
||||
-- Name: weather_objects; Type: TABLE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE TABLE public.weather_objects (
|
||||
id integer NOT NULL,
|
||||
name character varying(500) NOT NULL,
|
||||
description text,
|
||||
type character varying(100) NOT NULL,
|
||||
location character varying(255),
|
||||
last_update timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
|
||||
status character varying(50) DEFAULT 'active'::character varying,
|
||||
batterie integer,
|
||||
type_batterie character varying(50),
|
||||
CONSTRAINT weather_objects_batterie_check CHECK (((batterie >= 0) AND (batterie <= 100)))
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.weather_objects OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- TOC entry 217 (class 1259 OID 16466)
|
||||
-- Name: weather_objects_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.weather_objects_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER SEQUENCE public.weather_objects_id_seq OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- TOC entry 218 (class 1259 OID 16467)
|
||||
-- Name: weather_objects_id_seq1; Type: SEQUENCE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.weather_objects_id_seq1
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER SEQUENCE public.weather_objects_id_seq1 OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- TOC entry 4922 (class 0 OID 0)
|
||||
-- Dependencies: 218
|
||||
-- Name: weather_objects_id_seq1; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.weather_objects_id_seq1 OWNED BY public.weather_objects.id;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4755 (class 2604 OID 16482)
|
||||
-- Name: weather_data id; Type: DEFAULT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.weather_data ALTER COLUMN id SET DEFAULT nextval('public.weather_data_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4752 (class 2604 OID 16471)
|
||||
-- Name: weather_objects id; Type: DEFAULT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.weather_objects ALTER COLUMN id SET DEFAULT nextval('public.weather_objects_id_seq1'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4915 (class 0 OID 32768)
|
||||
-- Dependencies: 222
|
||||
-- Data for Name: range_data; Type: TABLE DATA; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
COPY public.range_data (station_id, temperature_min, temperature_max, pressure_min, pressure_max, humidity_min, humidity_max) FROM stdin;
|
||||
1 -33 42 980 1040 30 84
|
||||
2 -15 50 980 1040 30 90
|
||||
3 -15 50 980 1040 30 90
|
||||
4 -15 50 980 1040 30 90
|
||||
5 -15 50 980 1040 30 90
|
||||
6 -15 50 980 1040 30 90
|
||||
7 -15 50 980 1040 30 90
|
||||
8 -15 50 980 1040 30 90
|
||||
9 -15 50 980 1040 30 90
|
||||
10 -15 50 980 1040 30 90
|
||||
\.
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4914 (class 0 OID 16479)
|
||||
-- Dependencies: 221
|
||||
-- Data for Name: weather_data; Type: TABLE DATA; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
COPY public.weather_data (id, station_id, temperature, humidity, pressure, wind_speed, wind_direction, "timestamp") FROM stdin;
|
||||
1 1 21.50 60.20 1013.10 5.40 Nord-Ouest 2025-03-29 18:47:46.685241
|
||||
2 2 22.30 55.00 1012.50 3.20 Sud-Ouest 2025-03-29 18:47:46.685241
|
||||
3 3 24.10 50.00 1010.80 6.00 Est 2025-03-29 18:47:46.685241
|
||||
4 1 19.80 65.40 1014.00 4.50 Ouest 2025-03-29 18:47:46.685241
|
||||
5 2 20.60 59.30 1013.50 2.80 Nord 2025-03-29 18:47:46.685241
|
||||
6 1 22.50 60.00 1012.50 12.30 Nord-Ouest 2025-03-29 08:00:00
|
||||
7 1 23.00 65.00 1013.25 14.00 Ouest 2025-03-29 09:00:00
|
||||
8 1 24.00 70.00 1014.75 15.20 Nord 2025-03-29 10:00:00
|
||||
9 2 21.50 55.00 1011.30 11.00 Sud 2025-03-29 08:30:00
|
||||
10 2 22.00 60.00 1012.80 13.00 Est 2025-03-29 09:30:00
|
||||
11 2 23.50 63.00 1013.50 14.50 Sud-Est 2025-03-29 10:30:00
|
||||
12 3 26.00 58.00 1012.90 17.00 Ouest 2025-03-29 11:00:00
|
||||
13 3 27.00 60.00 1014.00 18.50 Nord-Ouest 2025-03-29 12:00:00
|
||||
14 3 28.00 62.00 1015.10 16.00 Nord 2025-03-29 13:00:00
|
||||
15 4 19.50 75.00 1010.00 9.50 Sud-Ouest 2025-03-29 08:00:00
|
||||
16 4 20.00 80.00 1010.50 10.00 Sud 2025-03-29 09:00:00
|
||||
17 4 21.50 85.00 1011.00 11.50 Est 2025-03-29 10:00:00
|
||||
18 5 18.00 90.00 1010.70 8.00 Ouest 2025-03-29 08:30:00
|
||||
19 5 18.50 92.00 1011.20 7.00 Nord-Ouest 2025-03-29 09:30:00
|
||||
20 5 19.00 95.00 1011.80 6.50 Nord 2025-03-29 10:30:00
|
||||
21 6 24.50 65.00 1013.90 13.00 Sud 2025-03-29 11:00:00
|
||||
22 6 25.00 66.00 1014.20 14.50 Ouest 2025-03-29 12:00:00
|
||||
23 6 26.50 68.00 1015.50 16.00 Sud-Ouest 2025-03-29 13:00:00
|
||||
24 7 21.00 60.00 1012.50 11.50 Est 2025-03-29 08:00:00
|
||||
25 7 22.50 62.00 1013.00 12.00 Nord-Ouest 2025-03-29 09:00:00
|
||||
26 7 23.00 64.00 1013.75 13.50 Sud-Est 2025-03-29 10:00:00
|
||||
27 8 25.00 58.00 1012.10 16.50 Nord 2025-03-29 08:30:00
|
||||
28 8 26.00 60.00 1013.30 17.50 Ouest 2025-03-29 09:30:00
|
||||
29 8 27.00 62.00 1014.50 18.00 Sud-Ouest 2025-03-29 10:30:00
|
||||
30 9 22.00 67.00 1011.40 14.00 Est 2025-03-29 11:00:00
|
||||
31 9 23.00 69.00 1012.60 15.00 Nord-Ouest 2025-03-29 12:00:00
|
||||
32 9 24.00 72.00 1013.80 16.00 Nord 2025-03-29 13:00:00
|
||||
33 10 18.00 55.00 1010.20 10.00 Ouest 2025-03-29 08:00:00
|
||||
34 10 19.00 58.00 1011.00 11.50 Sud-Ouest 2025-03-29 09:00:00
|
||||
35 10 20.00 60.00 1011.70 12.50 Est 2025-03-29 10:00:00
|
||||
\.
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4912 (class 0 OID 16468)
|
||||
-- Dependencies: 219
|
||||
-- Data for Name: weather_objects; Type: TABLE DATA; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
COPY public.weather_objects (id, name, description, type, location, last_update, status, batterie, type_batterie) FROM stdin;
|
||||
1 Station Paris Station météo située à Paris, France. Mesures de température, humidité, pression et vent. station Paris, France 2025-04-07 20:47:06.264847 active 100 solaire
|
||||
9 Station Nice Station météo située à Nice, France. Elle mesure la température, l'humidité et la pression. station Nice, France 2025-03-31 18:31:23.038047 active 100 solaire
|
||||
2 Station Lyon Station météo située à Lyon, France. Mesures de température, humidité, pression et vent. station Lyon, France 2025-03-30 12:16:00.835834 active 100 solaire
|
||||
3 Station Marseille Station météo située à Marseille, France. Mesures de température, humidité, pression et vent. station Marseille, France 2025-03-30 17:01:10.631653 inactive 100 solaire
|
||||
4 Capteur Bordeaux Capteur de température et d'humidité à Bordeaux. capteur Bordeaux, France 2025-03-30 17:53:01.42853 active 100 solaire
|
||||
5 Capteur Lille Capteur de pression atmosphérique à Lille. capteur Lille, France 2025-03-31 21:32:04.955306 inactive 100 solaire
|
||||
6 Capteur Nantes Capteur de vent à Nantes. capteur Nantes, France 2025-03-30 20:10:18.547523 active 100 solaire
|
||||
7 Station Toulouse Station météo à Toulouse mesurant la température, l'humidité, la pression et la vitesse du vent. station Toulouse, France 2025-04-02 15:43:34.803703 active 100 solaire
|
||||
10 Capteur Paris Sud Capteur de température et humidité à Paris Sud. capteur Paris, France 2025-04-02 23:09:38.725522 inactive 100 solaire
|
||||
8 Capteur Grenoble Capteur de température à Grenoble. capteur Grenoble, France 2025-04-04 10:40:08.247433 active 100 solaire
|
||||
\.
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4923 (class 0 OID 0)
|
||||
-- Dependencies: 220
|
||||
-- Name: weather_data_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval('public.weather_data_id_seq', 35, true);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4924 (class 0 OID 0)
|
||||
-- Dependencies: 217
|
||||
-- Name: weather_objects_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval('public.weather_objects_id_seq', 1, false);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4925 (class 0 OID 0)
|
||||
-- Dependencies: 218
|
||||
-- Name: weather_objects_id_seq1; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval('public.weather_objects_id_seq1', 17, true);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4763 (class 2606 OID 32774)
|
||||
-- Name: range_data station_meteo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.range_data
|
||||
ADD CONSTRAINT station_meteo_pkey PRIMARY KEY (station_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4761 (class 2606 OID 16485)
|
||||
-- Name: weather_data weather_data_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.weather_data
|
||||
ADD CONSTRAINT weather_data_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4759 (class 2606 OID 16477)
|
||||
-- Name: weather_objects weather_objects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.weather_objects
|
||||
ADD CONSTRAINT weather_objects_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 4764 (class 2606 OID 16486)
|
||||
-- Name: weather_data weather_data_station_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.weather_data
|
||||
ADD CONSTRAINT weather_data_station_id_fkey FOREIGN KEY (station_id) REFERENCES public.weather_objects(id);
|
||||
|
||||
|
||||
-- Completed on 2025-04-08 10:16:23
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user