campingmontagut/verify/booking.sql
jordi fita mas d945f55096 Add “part” of the bookings’ management
“Part”, because it is not possible to add or actually manage any
booking yet, but it has the export feature that we need to validate the
project.
2024-01-18 21:05:30 +01:00

26 lines
838 B
PL/PgSQL

-- Verify camper:booking on pg
begin;
select booking_id
, company_id
, slug
, booking_id
, holder_name
, arrival_date
, departure_date
, number_dogs
, acsi_card
, booking_status
, created_at
from camper.booking
where false;
select 1 / count(*) from pg_class where oid = 'camper.booking'::regclass and relrowsecurity;
select 1 / count(*) from pg_policy where polname = 'select_from_company' and polrelid = 'camper.booking'::regclass;
select 1 / count(*) from pg_policy where polname = 'insert_to_company' and polrelid = 'camper.booking'::regclass;
select 1 / count(*) from pg_policy where polname = 'update_company' and polrelid = 'camper.booking'::regclass;
select 1 / count(*) from pg_policy where polname = 'delete_from_company' and polrelid = 'camper.booking'::regclass;
rollback;