campingmontagut/deploy/booking_invoice.sql
jordi fita mas ff9f33dfba Add invoicing of bookings
It is a bit user-hostile because you have to create a new customer prior
to create the invoice, but that’s what it is for now.
2024-04-28 21:56:51 +02:00

21 lines
499 B
PL/PgSQL

-- Deploy camper:booking_invoice to pg
-- requires: roles
-- requires: schema_camper
-- requires: booking
-- requires: invoice
begin;
set search_path to camper, public;
create table booking_invoice (
booking_id integer not null references booking,
invoice_id integer not null references invoice,
primary key (booking_id, invoice_id)
);
grant select, insert, update, delete on table booking_invoice to employee;
grant select, insert, update, delete on table booking_invoice to admin;
commit;