-- Deploy camper:weather_forecast to pg
-- requires: schema_camper
-- requires: roles
-- requires: extension_uri

begin;

set search_path to camper, public;

create table weather_forecast (
	station_uri uri primary key,
	weather_condition_id text not null,
	day_temperature numeric(5,2) not null,
	min_temperature numeric(5,2) not null,
	forecasted_at timestamp with time zone not null,
	updated_at timestamp with time zone not null
);

grant select on table weather_forecast to guest;
grant select on table weather_forecast to employee;
grant select, insert, update, delete on table weather_forecast to admin;

commit;
