camper/deploy/remove_cover_carousel_slide...

23 lines
580 B
PL/PgSQL

-- Deploy camper:remove_cover_carousel_slide to pg
-- requires: roles
-- requires: schema_camper
-- requires: cover_carousel
-- requires: cover_carousel_i18n
begin;
set search_path to camper, public;
create or replace function remove_cover_carousel_slide (media_id integer) returns void as
$$
delete from cover_carousel_i18n where media_id = $1;
delete from cover_carousel where media_id = $1;
$$
language sql
;
revoke execute on function remove_cover_carousel_slide (integer) from public;
grant execute on function remove_cover_carousel_slide (integer) to admin;
commit;