campingmontagut/deploy/acsi_option.sql
jordi fita mas 0412ffca05 Compute ACSI discount
After months of keeping what does the ACSI checkbox mean, now customer
told us that we should add a discount based on a series of
arbitrary conditions that, and need to be done NOW!

There is no UI to edit the conditions due to lack of time.
2024-03-14 22:08:01 +01:00

23 lines
595 B
PL/PgSQL

-- Deploy camper:acsi_option to pg
-- requires: roles
-- requires: schema_camper
-- requires: acsi
-- requires: campsite_type_option
begin;
set search_path to camper, public;
create table acsi_option (
campsite_type_id integer not null references acsi,
campsite_type_option_id integer not null references campsite_type_option,
units positive_integer not null,
primary key (campsite_type_id, campsite_type_option_id)
);
grant select on table acsi_option to guest;
grant select on table acsi_option to employee;
grant select, insert, update, delete on table acsi_option to admin;
commit;