23 lines
503 B
PL/PgSQL
23 lines
503 B
PL/PgSQL
-- Deploy camper:remove_service to pg
|
|
-- requires: roles
|
|
-- requires: schema_camper
|
|
-- requires: service
|
|
-- requires: service_i18n
|
|
|
|
begin;
|
|
|
|
set search_path to camper, public;
|
|
|
|
create or replace function remove_service(service_id integer) returns void as
|
|
$$
|
|
delete from service_i18n where service_id = $1;
|
|
delete from service where service_id = $1;
|
|
$$
|
|
language sql
|
|
;
|
|
|
|
revoke execute on function remove_service(integer) from public;
|
|
grant execute on function remove_service(integer) to admin;
|
|
|
|
commit;
|