29 lines
578 B
SQL
29 lines
578 B
SQL
create table public.locations
|
|
(
|
|
id serial primary key,
|
|
location_name varchar(255) not null unique
|
|
);
|
|
|
|
|
|
create table public.meteo_data
|
|
(
|
|
id serial primary key,
|
|
|
|
location_id int not null references public.locations (id),
|
|
max_temp float not null,
|
|
min_temp float not null,
|
|
rainfall float not null,
|
|
cloudiness float not null,
|
|
|
|
created_at timestamp not null default now()
|
|
);
|
|
|
|
create table public.rejected_data
|
|
(
|
|
id serial primary key,
|
|
raw_data text not null,
|
|
reason text default null,
|
|
|
|
created_at timestamp not null default now()
|
|
)
|