-- Deploy kakeibo:delete_transaction to pg
-- requires: transactions
-- requires: appschema

BEGIN;

CREATE OR REPLACE FUNCTION kakeibo.delete_transaction(p_id integer)
  RETURNS VOID AS $$
BEGIN
  DELETE FROM kakeibo.transactions WHERE id = p_id;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;

COMMIT;
