20 lines
404 B
SQL
20 lines
404 B
SQL
create table public.locations
|
|
(
|
|
id serial primary key,
|
|
location_name varchar(255) not null unique
|
|
);
|
|
|
|
|
|
create table public.temp_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()
|
|
);
|