2024-08-21 01:36:12 +00:00
|
|
|
-- Deploy numerus:attach_to_collection to pg
|
|
|
|
-- requires: roles
|
2025-01-30 22:24:16 +00:00
|
|
|
-- requires: attach_to_payment
|
2024-08-21 01:36:12 +00:00
|
|
|
|
|
|
|
begin;
|
|
|
|
|
|
|
|
set search_path to numerus, public;
|
|
|
|
|
|
|
|
create or replace function attach_to_collection(collection_slug uuid, original_filename text, mime_type text, content bytea) returns void as
|
|
|
|
$$
|
2025-01-30 22:24:16 +00:00
|
|
|
select attach_to_payment(collection_slug, original_filename, mime_type, content);
|
2024-08-21 01:36:12 +00:00
|
|
|
$$
|
|
|
|
language sql
|
|
|
|
;
|
|
|
|
|
|
|
|
revoke execute on function attach_to_collection(uuid, text, text, bytea) from public;
|
|
|
|
grant execute on function attach_to_collection(uuid, text, text, bytea) to invoicer;
|
|
|
|
grant execute on function attach_to_collection(uuid, text, text, bytea) to admin;
|
|
|
|
|
|
|
|
commit;
|