-- Deploy camper:remove_home_carousel_slide to pg
-- requires: roles
-- requires: schema_camper
-- requires: home_carousel
-- requires: home_carousel_i18n

begin;

set search_path to camper, public;

create or replace function remove_home_carousel_slide (media_id integer) returns void as
$$
	delete from home_carousel_i18n where media_id = $1;
	delete from home_carousel where media_id = $1;
$$
	language sql
;

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

commit;