24 lines
606 B
PL/PgSQL
24 lines
606 B
PL/PgSQL
-- Deploy camper:acsi to pg
|
|
-- requires: roles
|
|
-- requires: schema_camper
|
|
-- requires: campsite_type
|
|
|
|
begin;
|
|
|
|
set search_path to camper, public;
|
|
|
|
create table acsi (
|
|
campsite_type_id integer primary key references campsite_type,
|
|
number_adults positive_integer not null,
|
|
number_teenagers nonnegative_integer not null,
|
|
number_children nonnegative_integer not null,
|
|
number_dogs nonnegative_integer not null,
|
|
cost_per_night nonnegative_integer not null
|
|
);
|
|
|
|
grant select on table acsi to guest;
|
|
grant select on table acsi to employee;
|
|
grant select, insert, update, delete on table acsi to admin;
|
|
|
|
commit;
|