-- Deploy kakeibo:delete_item to pg
-- requires: schema
-- requires: items

BEGIN;

CREATE OR REPLACE FUNCTION kakeibo.delete_item(
  p_item_id INTEGER
) RETURNS VOID AS $$
  BEGIN
    DELETE FROM kakeibo.items WHERE id = p_item_id;
  END;
$$ LANGUAGE plpgsql SECURITY DEFINER;

COMMIT;
