Permissions for plpython3u and add claim_boost
This commit is contained in:
parent
d0bcdde4c8
commit
01cc1d78ef
@ -131,7 +131,10 @@ end;
|
|||||||
$$ language plpgsql;
|
$$ language plpgsql;
|
||||||
|
|
||||||
-- Needed to load the python3 extension
|
-- Needed to load the python3 extension
|
||||||
CREATE EXTENSION plpython3u;
|
create or replace trusted language plpython3u;
|
||||||
|
-- If you don't grant this permission then devs will not be able to update this function
|
||||||
|
-- It's dangerous though, I guess
|
||||||
|
update pg_language set lanpltrusted = true where lanname = 'plpython3u';
|
||||||
|
|
||||||
create or replace function download_sheets()
|
create or replace function download_sheets()
|
||||||
returns void as $$
|
returns void as $$
|
||||||
|
@ -280,7 +280,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
$$ language plpgsql;
|
$$ language plpgsql;
|
||||||
|
|
||||||
|
|
||||||
create or replace function purchase_item(
|
create or replace function purchase_item(
|
||||||
p_user_id uuid,
|
p_user_id uuid,
|
||||||
p_store_item_id integer
|
p_store_item_id integer
|
||||||
@ -397,7 +396,7 @@ begin
|
|||||||
raise exception 'Unable to find an inventory item that is owned and not actively staked';
|
raise exception 'Unable to find an inventory item that is owned and not actively staked';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
select claim_amount
|
select claim_amount + claim_boost
|
||||||
into total_stake_amount
|
into total_stake_amount
|
||||||
from inventory_item
|
from inventory_item
|
||||||
join store_item on inventory_item.store_item_id = store_item.id
|
join store_item on inventory_item.store_item_id = store_item.id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user