 -- Name: concepts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE concepts_id_seq
+CREATE SEQUENCE public.concepts_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE

-- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE notifications_id_seq OWNED BY notifications.id;


--
-- Name: oauth_access_grants; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE oauth_access_grants (
    id integer NOT NULL,
    resource_owner_id integer NOT NULL,
    application_id integer NOT NULL,


            END IF;
          END LOOP;
          
          IF max_item IS NOT NULL AND first_item IS NOT NULL THEN
            time_spent := time_spent + EXTRACT( EPOCH FROM max_item - first_item );
          END IF;
          
          RETURN time_spent;
        END;
      $$;
