CREATE SCHEMA "MYSCHEMA";

CREATE SEQUENCE "MYSCHEMA"."STAFF_SEQ"
    AS integer
    START WITH 1
    INCREMENT BY 1
    MINVALUE 1
    NO MAXVALUE
    NO CYCLE
    CACHE 1;

CREATE PROCEDURE "MYSCHEMA"."GENERATE_STAFF_ID"(OUT STAFF_SEQ integer)
LANGUAGE plpgsql
AS $$
BEGIN
    STAFF_SEQ := nextval('"MYSCHEMA"."STAFF_SEQ"');
END;
$$;
