-- Deploy camper:remove_services_carousel_slide to pg
-- requires: roles
-- requires: schema_camper
-- requires: services_carousel
-- requires: services_carousel_i18n

begin;

set search_path to camper, public;

create or replace function remove_services_carousel_slide(media_id integer) returns void as
$$
	delete from services_carousel_i18n where media_id = $1;
	delete from services_carousel where media_id = $1;
$$
	language sql
;

revoke execute on function remove_services_carousel_slide(integer) from public;
grant execute on function remove_services_carousel_slide (integer) to admin;

commit;
