--
--



--
-- Name: postgres_fdw; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS postgres_fdw WITH SCHEMA public;


--
-- Name: EXTENSION postgres_fdw; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION postgres_fdw IS 'foreign-data wrapper for remote PostgreSQL servers';


--
-- Name: plans_snapshot_lock; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.plans_snapshot_lock AS ENUM (
    'Y',
    'N'
);


ALTER TYPE public.plans_snapshot_lock OWNER TO phpuser;

--
-- Name: ptc_data_fixed; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.ptc_data_fixed AS ENUM (
    'Y',
    'N'
);


ALTER TYPE public.ptc_data_fixed OWNER TO phpuser;

--
-- Name: ptc_data_prepaid; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.ptc_data_prepaid AS ENUM (
    'Y',
    'N'
);


ALTER TYPE public.ptc_data_prepaid OWNER TO phpuser;

--
-- Name: ptc_data_promotion; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.ptc_data_promotion AS ENUM (
    'Y',
    'N'
);


ALTER TYPE public.ptc_data_promotion OWNER TO phpuser;

--
-- Name: rep_users_accept_decline_status; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.rep_users_accept_decline_status AS ENUM (
    'Declined',
    'Accepted'
);


ALTER TYPE public.rep_users_accept_decline_status OWNER TO phpuser;

--
-- Name: rep_users_account_status; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.rep_users_account_status AS ENUM (
    'inactive',
    'active'
);


ALTER TYPE public.rep_users_account_status OWNER TO phpuser;

--
-- Name: rep_users_disposition; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.rep_users_disposition AS ENUM (
    'Open',
    'Closed'
);


ALTER TYPE public.rep_users_disposition OWNER TO phpuser;

--
-- Name: review_approve; Type: TYPE; Schema: public; Owner: phpuser
--

CREATE TYPE public.review_approve AS ENUM (
    'y',
    'n',
    'r'
);


ALTER TYPE public.review_approve OWNER TO phpuser;

--
-- Name: dirty_items_function(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.dirty_items_function() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
IF current_user != 'phpuser' THEN
DELETE FROM tickets_serialized WHERE ticket_id IN (SELECT ticket_id FROM tickets_to_items WHERE item_id = NEW.id);
insert into dirty_items(item_id) values (NEW.id);
END IF;
 RETURN NEW;
END;
$$;


ALTER FUNCTION public.dirty_items_function() OWNER TO postgres;




ALTER SERVER cms OWNER TO postgres;




--
-- Name: account_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.account_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.account_id_seq OWNER TO postgres;



--
-- Name: actions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.actions (
    id bigint,
    ticket_id bigint,
    item_id bigint,
    queue_id bigint,
    jdoc jsonb,
    agent_id bigint,
    logtype integer
);


ALTER TABLE public.actions OWNER TO postgres;

--
-- Name: action_apis; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_apis (
    method character varying(255),
    start_time integer,
    end_time integer,
    seconds integer
)
INHERITS (public.actions);


ALTER TABLE public.action_apis OWNER TO postgres;

--
-- Name: action_api_energytexass; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_api_energytexass (
)
INHERITS (public.action_apis);


ALTER TABLE public.action_api_energytexass OWNER TO postgres;

--
-- Name: action_api_energytexas_creates; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_api_energytexas_creates (
)
INHERITS (public.action_api_energytexass);


ALTER TABLE public.action_api_energytexas_creates OWNER TO postgres;

--
-- Name: action_api_energytexas_dispositions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_api_energytexas_dispositions (
)
INHERITS (public.action_api_energytexass);


ALTER TABLE public.action_api_energytexas_dispositions OWNER TO postgres;

--
-- Name: action_api_energytexas_logins; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_api_energytexas_logins (
)
INHERITS (public.action_api_energytexass);


ALTER TABLE public.action_api_energytexas_logins OWNER TO postgres;

--
-- Name: action_api_energytexas_validates; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_api_energytexas_validates (
)
INHERITS (public.action_api_energytexass);


ALTER TABLE public.action_api_energytexas_validates OWNER TO postgres;

--
-- Name: action_emails; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_emails (
)
INHERITS (public.actions);


ALTER TABLE public.action_emails OWNER TO postgres;

--
-- Name: ad_groups; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.ad_groups (
    id bigint NOT NULL,
    auto_created character varying(1),
    name text,
    words_geo text,
    words_energy text,
    words_state text,
    campaign text,
    ad_group text,
    ad_text_1 text,
    ad_text_2 text,
    ad_text_3 text,
    ad_text_link text,
    words_valueprop text
);


ALTER TABLE public.ad_groups OWNER TO phpuser;

--
-- Name: ad_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.ad_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ad_groups_id_seq OWNER TO phpuser;

--
-- Name: ad_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.ad_groups_id_seq OWNED BY public.ad_groups.id;


--
-- Name: adwords; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.adwords (
    id bigint,
    v character varying(10),
    s character varying(10),
    c character varying(10),
    g character varying(10),
    a character varying(10),
    headline1 text,
    headline2 text,
    body1 text,
    body2 text
);


ALTER TABLE public.adwords OWNER TO postgres;

--
-- Name: alarmclock_archives; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.alarmclock_archives (
    id bigint,
    ticket_id bigint,
    ticket_class character varying(100),
    ticket_method character varying(100),
    called_class character varying(100),
    epoch bigint,
    start_epoch bigint,
    end_epoch bigint,
    results text
);


ALTER TABLE public.alarmclock_archives OWNER TO postgres;

--
-- Name: alarmclocks; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.alarmclocks (
    id bigint,
    ticket_id bigint,
    ticket_class character varying(100),
    ticket_method character varying(100),
    called_class character varying(100),
    epoch bigint
);


ALTER TABLE public.alarmclocks OWNER TO postgres;

--
-- Name: blackout_days; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.blackout_days (
    blackout_date date,
    rep character varying(50),
    id bigint NOT NULL
);


ALTER TABLE public.blackout_days OWNER TO postgres;

--
-- Name: blackout_days_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.blackout_days_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.blackout_days_id_seq OWNER TO postgres;

--
-- Name: blackout_days_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.blackout_days_id_seq OWNED BY public.blackout_days.id;


--
-- Name: blocked_ips; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.blocked_ips (
    id bigint NOT NULL,
    ip text,
    vid text,
    created timestamp with time zone
);


ALTER TABLE public.blocked_ips OWNER TO phpuser;

--
-- Name: blocked_ips_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.blocked_ips_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.blocked_ips_id_seq OWNER TO phpuser;

--
-- Name: blocked_ips_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.blocked_ips_id_seq OWNED BY public.blocked_ips.id;


--
-- Name: bookings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.bookings (
    id bigint,
    rep_id integer,
    state character(2),
    period character(6),
    upfront numeric(12,2),
    residual numeric(12,2),
    orders integer,
    residual_orders integer,
    upfront_item_id bigint,
    residual_item_id bigint
);


ALTER TABLE public.bookings OWNER TO postgres;

--
-- Name: buckets; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.buckets (
    id bigint,
    ticket_id bigint
);


ALTER TABLE public.buckets OWNER TO postgres;

--
-- Name: bucket_lifecycles; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.bucket_lifecycles (
    entered character(1) DEFAULT 'X'::bpchar NOT NULL,
    submitted character(1) DEFAULT 'X'::bpchar NOT NULL,
    errors character(1) DEFAULT 'X'::bpchar NOT NULL,
    deposit character(1) DEFAULT 'X'::bpchar NOT NULL,
    sent character(1) DEFAULT 'X'::bpchar NOT NULL,
    flowing character(1) DEFAULT 'X'::bpchar NOT NULL,
    churned character(1) DEFAULT 'X'::bpchar NOT NULL,
    cancelled character(1) DEFAULT 'X'::bpchar NOT NULL
)
INHERITS (public.buckets);


ALTER TABLE public.bucket_lifecycles OWNER TO postgres;

--
-- Name: bucket_marketings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.bucket_marketings (
    market_source character varying(50) DEFAULT 'X'::character varying NOT NULL,
    search_type character varying(10) DEFAULT 'X'::character varying NOT NULL,
    company character varying(50) DEFAULT 'X'::character varying NOT NULL,
    search_source character varying(30),
    search_company character varying(100),
    search_referrer character varying(200)
)
INHERITS (public.buckets);


ALTER TABLE public.bucket_marketings OWNER TO postgres;

--
-- Name: bucket_plans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.bucket_plans (
    months integer,
    plan_name character varying(200),
    rep_name character varying(100),
    state character(2)
)
INHERITS (public.buckets);


ALTER TABLE public.bucket_plans OWNER TO postgres;

--
-- Name: bucket_tpvs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.bucket_tpvs (
    tpv_completed character(1) DEFAULT 'X'::bpchar NOT NULL,
    tpv_approved character(1) DEFAULT 'X'::bpchar NOT NULL,
    tpv_rejected character(1) DEFAULT 'X'::bpchar NOT NULL
)
INHERITS (public.buckets);


ALTER TABLE public.bucket_tpvs OWNER TO postgres;

--
-- Name: c_serviceability_zips; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.c_serviceability_zips (
    zip_code text NOT NULL,
    tdsp text,
    tdsp_id bigint,
    city text,
    city_name_url text,
    state character varying(2),
    commodity character varying(1),
    overlap character varying(1),
    conflicted character varying(1),
    default_utility character varying(1),
    population bigint,
    id bigint NOT NULL,
    updated character varying(1)
);


ALTER TABLE public.c_serviceability_zips OWNER TO phpuser;

--
-- Name: c_serviceability_zips_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.c_serviceability_zips_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.c_serviceability_zips_id_seq OWNER TO phpuser;

--
-- Name: c_serviceability_zips_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.c_serviceability_zips_id_seq OWNED BY public.c_serviceability_zips.id;


--
-- Name: cached_pages; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cached_pages (
    id bigint NOT NULL,
    uri text,
    site_id bigint,
    market_id bigint,
    page_id bigint,
    file_name text,
    dirty character varying(1),
    has_rates character varying(1),
    counter bigint,
    hard_cache character varying(1) DEFAULT 'n'::character varying NOT NULL,
    created timestamp with time zone,
    modified timestamp with time zone,
    checked timestamp with time zone
);


ALTER TABLE public.cached_pages OWNER TO phpuser;

--
-- Name: cached_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cached_pages_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cached_pages_id_seq OWNER TO phpuser;

--
-- Name: cached_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cached_pages_id_seq OWNED BY public.cached_pages.id;


--
-- Name: cart_click_errors; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cart_click_errors (
    id bigint NOT NULL,
    cart_click_id numeric,
    field_name text,
    error_message text
);


ALTER TABLE public.cart_click_errors OWNER TO phpuser;

--
-- Name: cart_click_errors_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cart_click_errors_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cart_click_errors_id_seq OWNER TO phpuser;

--
-- Name: cart_click_errors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cart_click_errors_id_seq OWNED BY public.cart_click_errors.id;


--
-- Name: cart_clicks; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cart_clicks (
    id bigint NOT NULL,
    plan_id integer,
    ticket_id numeric,
    guid text
);


ALTER TABLE public.cart_clicks OWNER TO phpuser;

--
-- Name: cart_clicks_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cart_clicks_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cart_clicks_id_seq OWNER TO phpuser;

--
-- Name: cart_clicks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cart_clicks_id_seq OWNED BY public.cart_clicks.id;


--
-- Name: cart_errors; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.cart_errors (
    id bigint NOT NULL,
    ticket_id bigint,
    item_id bigint,
    rep_id integer,
    state character(2),
    item_model character varying(100),
    field character varying(50),
    error text,
    created timestamp without time zone
);


ALTER TABLE public.cart_errors OWNER TO postgres;

--
-- Name: cart_errors_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.cart_errors_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cart_errors_id_seq OWNER TO postgres;

--
-- Name: cart_errors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.cart_errors_id_seq OWNED BY public.cart_errors.id;


--
-- Name: chats; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.chats (
    id bigint NOT NULL,
    ticket_id numeric,
    author character varying(1),
    user_id numeric,
    message text,
    created numeric
);


ALTER TABLE public.chats OWNER TO phpuser;

--
-- Name: chats_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.chats_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.chats_id_seq OWNER TO phpuser;

--
-- Name: chats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.chats_id_seq OWNED BY public.chats.id;


--
-- Name: cis_notifications; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.cis_notifications (
    id bigint,
    user_id bigint,
    title character varying(100),
    message text,
    url character varying(255),
    created bigint,
    group_key character varying(100),
    status character varying(25),
    allow_handle character(1)
);


ALTER TABLE public.cis_notifications OWNER TO postgres;

--
-- Name: cis_stuff_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.cis_stuff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cis_stuff_id_seq OWNER TO postgres;

--
-- Name: cis_stuff_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.cis_stuff_id_seq OWNED BY public.cis_stuff.id;


--
-- Name: cis_tests; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.cis_tests (
    id bigint NOT NULL,
    name character varying(100),
    model character varying(100),
    method character varying(50),
    data text,
    status character varying(50),
    result text,
    started timestamp without time zone,
    finished timestamp without time zone
);


ALTER TABLE public.cis_tests OWNER TO postgres;

--
-- Name: cis_tests_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.cis_tests_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cis_tests_id_seq OWNER TO postgres;

--
-- Name: cis_tests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.cis_tests_id_seq OWNED BY public.cis_tests.id;


--
-- Name: city_datas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.city_datas (
    id bigint,
    city character varying(50),
    state character(2),
    key character varying(50),
    value character varying(255),
    description text
);


ALTER TABLE public.city_datas OWNER TO postgres;

--
-- Name: city_to_market; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.city_to_market (
    id bigint NOT NULL,
    city text,
    state character varying(2),
    market_id bigint,
    plans bigint,
    created timestamp with time zone,
    modified timestamp with time zone DEFAULT now() NOT NULL,
    zips bigint
);


ALTER TABLE public.city_to_market OWNER TO phpuser;

--
-- Name: city_to_market_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.city_to_market_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.city_to_market_id_seq OWNER TO phpuser;

--
-- Name: city_to_market_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.city_to_market_id_seq OWNED BY public.city_to_market.id;


--
-- Name: city_to_zip_count; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.city_to_zip_count (
    city character varying(64),
    zip5 character varying(5),
    thecount numeric DEFAULT '0'::numeric NOT NULL
);


ALTER TABLE public.city_to_zip_count OWNER TO phpuser;

--
-- Name: cms_anchors; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_anchors (
    id bigint NOT NULL,
    slug text,
    href text,
    content text,
    is_nofollow smallint NOT NULL
);


ALTER TABLE public.cms_anchors OWNER TO phpuser;

--
-- Name: cms_anchors_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_anchors_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_anchors_id_seq OWNER TO phpuser;

--
-- Name: cms_anchors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_anchors_id_seq OWNED BY public.cms_anchors.id;


--
-- Name: cms_block_categories; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_block_categories (
    id bigint NOT NULL,
    name text
);


ALTER TABLE public.cms_block_categories OWNER TO phpuser;

--
-- Name: cms_block_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_block_categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_block_categories_id_seq OWNER TO phpuser;

--
-- Name: cms_block_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_block_categories_id_seq OWNED BY public.cms_block_categories.id;


--
-- Name: cms_blocks; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_blocks (
    id bigint NOT NULL,
    slug text,
    content text,
    category_id bigint NOT NULL
);


ALTER TABLE public.cms_blocks OWNER TO phpuser;

--
-- Name: cms_blocks_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_blocks_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_blocks_id_seq OWNER TO phpuser;

--
-- Name: cms_blocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_blocks_id_seq OWNED BY public.cms_blocks.id;


--
-- Name: cms_bold_chat_rules; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_bold_chat_rules (
    id bigint NOT NULL,
    name text,
    code text
);


ALTER TABLE public.cms_bold_chat_rules OWNER TO phpuser;

--
-- Name: cms_bold_chat_rules_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_bold_chat_rules_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_bold_chat_rules_id_seq OWNER TO phpuser;

--
-- Name: cms_bold_chat_rules_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_bold_chat_rules_id_seq OWNED BY public.cms_bold_chat_rules.id;


--
-- Name: cms_bundle_list_items; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_bundle_list_items (
    id bigint NOT NULL,
    bundle_custom_id bigint,
    list_item_content text,
    hover_content text,
    sort_order bigint
);


ALTER TABLE public.cms_bundle_list_items OWNER TO phpuser;

--
-- Name: cms_bundle_list_items_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_bundle_list_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_bundle_list_items_id_seq OWNER TO phpuser;

--
-- Name: cms_bundle_list_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_bundle_list_items_id_seq OWNED BY public.cms_bundle_list_items.id;


--
-- Name: cms_category; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_category (
    id bigint NOT NULL,
    title text NOT NULL
);


ALTER TABLE public.cms_category OWNER TO phpuser;

--
-- Name: cms_category_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_category_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_category_id_seq OWNER TO phpuser;

--
-- Name: cms_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_category_id_seq OWNED BY public.cms_category.id;


--
-- Name: cms_cities; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_cities (
    id bigint NOT NULL,
    name text,
    state_id bigint
);


ALTER TABLE public.cms_cities OWNER TO phpuser;

--
-- Name: cms_cities_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_cities_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_cities_id_seq OWNER TO phpuser;

--
-- Name: cms_cities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_cities_id_seq OWNED BY public.cms_cities.id;


--
-- Name: cms_cities_to_markets; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_cities_to_markets (
    id bigint NOT NULL,
    city text,
    region_id bigint,
    market_id bigint,
    state_id bigint
);


ALTER TABLE public.cms_cities_to_markets OWNER TO phpuser;

--
-- Name: cms_cities_to_markets_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_cities_to_markets_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_cities_to_markets_id_seq OWNER TO phpuser;

--
-- Name: cms_cities_to_markets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_cities_to_markets_id_seq OWNED BY public.cms_cities_to_markets.id;


--
-- Name: cms_form_required_fields; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_form_required_fields (
    id bigint NOT NULL,
    form_id bigint NOT NULL,
    field_name text NOT NULL
);


ALTER TABLE public.cms_form_required_fields OWNER TO phpuser;

--
-- Name: cms_form_required_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_form_required_fields_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_form_required_fields_id_seq OWNER TO phpuser;

--
-- Name: cms_form_required_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_form_required_fields_id_seq OWNED BY public.cms_form_required_fields.id;


--
-- Name: cms_forms; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_forms (
    id bigint NOT NULL,
    name text,
    email_subject_line text,
    email_recipients text,
    confirmation_page_url text,
    event_name text
);


ALTER TABLE public.cms_forms OWNER TO phpuser;

--
-- Name: cms_forms_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_forms_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_forms_id_seq OWNER TO phpuser;

--
-- Name: cms_forms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_forms_id_seq OWNED BY public.cms_forms.id;


--
-- Name: cms_map_cities; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_map_cities (
    id bigint NOT NULL,
    name text,
    state text
);


ALTER TABLE public.cms_map_cities OWNER TO phpuser;

--
-- Name: cms_map_cities_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_map_cities_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_map_cities_id_seq OWNER TO phpuser;

--
-- Name: cms_map_cities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_map_cities_id_seq OWNED BY public.cms_map_cities.id;


--
-- Name: cms_markets; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_markets (
    id bigint NOT NULL,
    parent_id bigint DEFAULT '0'::bigint NOT NULL,
    name text,
    type text DEFAULT 'tdsp'::text,
    description text DEFAULT ''::text,
    state text DEFAULT ''::text,
    phone text,
    duns_number character varying(13),
    status character varying(1),
    commodity character varying(1) DEFAULT 'e'::character varying NOT NULL
);


ALTER TABLE public.cms_markets OWNER TO phpuser;

--
-- Name: cms_markets_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_markets_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_markets_id_seq OWNER TO phpuser;

--
-- Name: cms_markets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_markets_id_seq OWNED BY public.cms_markets.id;


--
-- Name: cms_nav_items; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_nav_items (
    id bigint NOT NULL,
    parent bigint DEFAULT '0'::bigint,
    site_id bigint,
    page_id bigint,
    category_id bigint,
    nav_item_type_id bigint,
    nav_title text,
    class text,
    url text,
    sort_order bigint
);


ALTER TABLE public.cms_nav_items OWNER TO phpuser;

--
-- Name: cms_nav_items_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_nav_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_nav_items_id_seq OWNER TO phpuser;

--
-- Name: cms_nav_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_nav_items_id_seq OWNED BY public.cms_nav_items.id;


--
-- Name: cms_nav_types; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_nav_types (
    id bigint NOT NULL,
    type text
);


ALTER TABLE public.cms_nav_types OWNER TO phpuser;

--
-- Name: cms_nav_types_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_nav_types_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_nav_types_id_seq OWNER TO phpuser;

--
-- Name: cms_nav_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_nav_types_id_seq OWNED BY public.cms_nav_types.id;


--
-- Name: cms_page_components; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_page_components (
    id bigint NOT NULL,
    name text
);


ALTER TABLE public.cms_page_components OWNER TO phpuser;

--
-- Name: cms_page_components_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_page_components_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_page_components_id_seq OWNER TO phpuser;

--
-- Name: cms_page_components_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_page_components_id_seq OWNED BY public.cms_page_components.id;


--
-- Name: cms_page_to_bundle; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_page_to_bundle (
    id bigint NOT NULL,
    page_id bigint NOT NULL,
    bundle_id bigint NOT NULL
);


ALTER TABLE public.cms_page_to_bundle OWNER TO phpuser;

--
-- Name: cms_page_to_bundle_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_page_to_bundle_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_page_to_bundle_id_seq OWNER TO phpuser;

--
-- Name: cms_page_to_bundle_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_page_to_bundle_id_seq OWNED BY public.cms_page_to_bundle.id;


--
-- Name: cms_page_to_component; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_page_to_component (
    id bigint NOT NULL,
    page_id bigint,
    component_id bigint
);


ALTER TABLE public.cms_page_to_component OWNER TO phpuser;

--
-- Name: cms_page_to_component_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_page_to_component_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_page_to_component_id_seq OWNER TO phpuser;

--
-- Name: cms_page_to_component_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_page_to_component_id_seq OWNED BY public.cms_page_to_component.id;


--
-- Name: cms_page_to_market; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_page_to_market (
    id bigint NOT NULL,
    page_id bigint DEFAULT '0'::bigint NOT NULL,
    market_id bigint DEFAULT '0'::bigint NOT NULL
);


ALTER TABLE public.cms_page_to_market OWNER TO phpuser;

--
-- Name: cms_page_to_market_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_page_to_market_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_page_to_market_id_seq OWNER TO phpuser;

--
-- Name: cms_page_to_market_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_page_to_market_id_seq OWNED BY public.cms_page_to_market.id;


--
-- Name: cms_page_to_rep; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_page_to_rep (
    id bigint NOT NULL,
    page_id bigint NOT NULL,
    rep_id bigint NOT NULL
);


ALTER TABLE public.cms_page_to_rep OWNER TO phpuser;

--
-- Name: cms_page_to_rep_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_page_to_rep_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_page_to_rep_id_seq OWNER TO phpuser;

--
-- Name: cms_page_to_rep_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_page_to_rep_id_seq OWNED BY public.cms_page_to_rep.id;


--
-- Name: cms_page_types; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_page_types (
    id bigint NOT NULL,
    name text
);


ALTER TABLE public.cms_page_types OWNER TO phpuser;

--
-- Name: cms_page_types_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_page_types_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_page_types_id_seq OWNER TO phpuser;

--
-- Name: cms_page_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_page_types_id_seq OWNED BY public.cms_page_types.id;


--
-- Name: cms_page_votes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.cms_page_votes (
    id integer NOT NULL,
    vid character varying(255),
    page_id integer,
    vote integer,
    created timestamp without time zone
);


ALTER TABLE public.cms_page_votes OWNER TO postgres;

--
-- Name: cms_page_votes_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.cms_page_votes_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_page_votes_id_seq OWNER TO postgres;

--
-- Name: cms_page_votes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.cms_page_votes_id_seq OWNED BY public.cms_page_votes.id;


--
-- Name: cms_pages; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_pages (
    id bigint NOT NULL,
    page_type_id bigint NOT NULL,
    site_id bigint,
    parent_id bigint NOT NULL,
    template_id bigint,
    slug text,
    html_title text,
    meta_desc text,
    meta_key text,
    head_content text,
    page_title text,
    content_primary text,
    content_secondary text,
    content_parent text,
    content_auxiliary text,
    content_mobile text,
    pricegrid_type_id bigint,
    pricegrid_more_link text,
    pricegrid_header_title text,
    pricegrid_plan_page_link_option smallint,
    pricegrid_order_page_slug text,
    address_box_title text,
    default_msid text,
    default_premise character varying(1) DEFAULT 'R'::character varying,
    canonical character varying(1) DEFAULT '1'::character varying,
    bold_chat_rule_id bigint NOT NULL,
    phone text NOT NULL,
    web_source_id bigint NOT NULL,
    formula_id bigint NOT NULL,
    market_label text,
    redirect character varying(1) DEFAULT '0'::character varying,
    promo_code text,
    symlink_of bigint,
    no_index bigint DEFAULT '0'::bigint,
    hard_cache bigint DEFAULT '0'::bigint NOT NULL,
    rep_id bigint,
    depth integer
);


ALTER TABLE public.cms_pages OWNER TO phpuser;

--
-- Name: cms_pages_deleting; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_pages_deleting (
    id bigint DEFAULT '0'::bigint NOT NULL,
    page_type_id bigint NOT NULL,
    site_id bigint,
    parent_id bigint NOT NULL,
    template_id bigint,
    slug text,
    html_title text,
    meta_desc text,
    meta_key text,
    head_content text,
    page_title text,
    content_primary text,
    content_secondary text,
    content_auxiliary text,
    content_mobile text,
    pricegrid_type_id bigint,
    pricegrid_more_link text,
    pricegrid_header_title text,
    pricegrid_plan_page_link_option smallint,
    pricegrid_order_page_slug text,
    address_box_title text,
    default_msid text,
    default_premise character varying(1) DEFAULT 'R'::character varying,
    canonical character varying(1) DEFAULT '1'::character varying,
    bold_chat_rule_id bigint NOT NULL,
    phone text NOT NULL,
    web_source_id bigint NOT NULL,
    formula_id bigint NOT NULL,
    market_label text,
    redirect character varying(1) DEFAULT '0'::character varying,
    promo_code text,
    symlink_of bigint
);


ALTER TABLE public.cms_pages_deleting OWNER TO phpuser;

--
-- Name: cms_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_pages_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_pages_id_seq OWNER TO phpuser;

--
-- Name: cms_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_pages_id_seq OWNED BY public.cms_pages.id;


--
-- Name: cms_pricegrid_to_bundle; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_pricegrid_to_bundle (
    id bigint NOT NULL,
    pricegrid_id bigint NOT NULL,
    bundle_id bigint NOT NULL
);


ALTER TABLE public.cms_pricegrid_to_bundle OWNER TO phpuser;

--
-- Name: cms_pricegrid_to_bundle_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_pricegrid_to_bundle_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_pricegrid_to_bundle_id_seq OWNER TO phpuser;

--
-- Name: cms_pricegrid_to_bundle_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_pricegrid_to_bundle_id_seq OWNED BY public.cms_pricegrid_to_bundle.id;


--
-- Name: cms_pricegrid_to_rep; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_pricegrid_to_rep (
    id bigint NOT NULL,
    pricegrid_id bigint NOT NULL,
    rep_id bigint NOT NULL
);


ALTER TABLE public.cms_pricegrid_to_rep OWNER TO phpuser;

--
-- Name: cms_pricegrid_to_rep_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_pricegrid_to_rep_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_pricegrid_to_rep_id_seq OWNER TO phpuser;

--
-- Name: cms_pricegrid_to_rep_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_pricegrid_to_rep_id_seq OWNED BY public.cms_pricegrid_to_rep.id;


--
-- Name: cms_pricegrid_types; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_pricegrid_types (
    id bigint NOT NULL,
    type text,
    sort_order bigint
);


ALTER TABLE public.cms_pricegrid_types OWNER TO phpuser;

--
-- Name: cms_pricegrid_types_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_pricegrid_types_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_pricegrid_types_id_seq OWNER TO phpuser;

--
-- Name: cms_pricegrid_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_pricegrid_types_id_seq OWNED BY public.cms_pricegrid_types.id;


--
-- Name: cms_pricegrids; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_pricegrids (
    id bigint NOT NULL,
    slug text,
    description text,
    type_id bigint,
    more_link text,
    header_title text,
    plan_page_link_option smallint,
    order_page_slug text
);


ALTER TABLE public.cms_pricegrids OWNER TO phpuser;

--
-- Name: cms_pricegrids_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_pricegrids_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_pricegrids_id_seq OWNER TO phpuser;

--
-- Name: cms_pricegrids_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_pricegrids_id_seq OWNED BY public.cms_pricegrids.id;


--
-- Name: cms_random_block_items; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_random_block_items (
    id bigint NOT NULL,
    random_block_id bigint,
    content text
);


ALTER TABLE public.cms_random_block_items OWNER TO phpuser;

--
-- Name: cms_random_block_items_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_random_block_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_random_block_items_id_seq OWNER TO phpuser;

--
-- Name: cms_random_block_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_random_block_items_id_seq OWNED BY public.cms_random_block_items.id;


--
-- Name: cms_random_blocks; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_random_blocks (
    id bigint NOT NULL,
    slug text,
    description text
);


ALTER TABLE public.cms_random_blocks OWNER TO phpuser;

--
-- Name: cms_random_blocks_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_random_blocks_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_random_blocks_id_seq OWNER TO phpuser;

--
-- Name: cms_random_blocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_random_blocks_id_seq OWNED BY public.cms_random_blocks.id;


--
-- Name: cms_random_bundle_items; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_random_bundle_items (
    id bigint NOT NULL,
    bundle_custom_id bigint,
    description text
);


ALTER TABLE public.cms_random_bundle_items OWNER TO phpuser;

--
-- Name: cms_random_bundle_items_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_random_bundle_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_random_bundle_items_id_seq OWNER TO phpuser;

--
-- Name: cms_random_bundle_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_random_bundle_items_id_seq OWNED BY public.cms_random_bundle_items.id;


--
-- Name: cms_random_list_items; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_random_list_items (
    id bigint NOT NULL,
    random_list_id bigint,
    content text
);


ALTER TABLE public.cms_random_list_items OWNER TO phpuser;

--
-- Name: cms_random_list_items_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_random_list_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_random_list_items_id_seq OWNER TO phpuser;

--
-- Name: cms_random_list_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_random_list_items_id_seq OWNED BY public.cms_random_list_items.id;


--
-- Name: cms_random_lists; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_random_lists (
    id bigint NOT NULL,
    slug text,
    description text
);


ALTER TABLE public.cms_random_lists OWNER TO phpuser;

--
-- Name: cms_random_lists_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_random_lists_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_random_lists_id_seq OWNER TO phpuser;

--
-- Name: cms_random_lists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_random_lists_id_seq OWNED BY public.cms_random_lists.id;


--
-- Name: cms_rss_feeds; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_rss_feeds (
    id bigint NOT NULL,
    slug text,
    description text,
    feed_url text
);


ALTER TABLE public.cms_rss_feeds OWNER TO phpuser;

--
-- Name: cms_rss_feeds_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_rss_feeds_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_rss_feeds_id_seq OWNER TO phpuser;

--
-- Name: cms_rss_feeds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_rss_feeds_id_seq OWNED BY public.cms_rss_feeds.id;


--
-- Name: cms_site_to_bundle; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_site_to_bundle (
    id bigint NOT NULL,
    site_id bigint DEFAULT '0'::bigint NOT NULL,
    bundle_id bigint DEFAULT '0'::bigint NOT NULL
);


ALTER TABLE public.cms_site_to_bundle OWNER TO phpuser;

--
-- Name: cms_site_to_bundle_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_site_to_bundle_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_site_to_bundle_id_seq OWNER TO phpuser;

--
-- Name: cms_site_to_bundle_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_site_to_bundle_id_seq OWNED BY public.cms_site_to_bundle.id;


--
-- Name: cms_site_to_market; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_site_to_market (
    id bigint NOT NULL,
    site_id bigint NOT NULL,
    market_id bigint NOT NULL
);


ALTER TABLE public.cms_site_to_market OWNER TO phpuser;

--
-- Name: cms_site_to_market_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_site_to_market_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_site_to_market_id_seq OWNER TO phpuser;

--
-- Name: cms_site_to_market_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_site_to_market_id_seq OWNED BY public.cms_site_to_market.id;


--
-- Name: cms_site_to_rep; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_site_to_rep (
    id bigint NOT NULL,
    site_id bigint NOT NULL,
    rep_id bigint NOT NULL
);


ALTER TABLE public.cms_site_to_rep OWNER TO phpuser;

--
-- Name: cms_site_to_rep_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_site_to_rep_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_site_to_rep_id_seq OWNER TO phpuser;

--
-- Name: cms_site_to_rep_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_site_to_rep_id_seq OWNED BY public.cms_site_to_rep.id;


--
-- Name: cms_sites; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_sites (
    id bigint NOT NULL,
    name text,
    short_name text,
    tag_line text,
    domain text,
    domain_pretty text,
    city_id bigint,
    state_id bigint,
    google_analytics_id text,
    google_maps_key text,
    phone text,
    phone_tx text,
    phone_ga text,
    footer_content text,
    address_box_title text,
    bold_chat_rule_id bigint NOT NULL,
    plan_page_url text,
    category_id bigint,
    logo text,
    formula_id bigint,
    all_reviews character varying(1) DEFAULT 'N'::character varying NOT NULL,
    zip_entry_redirect_url text,
    base_url text,
    cart_base_url text,
    location_street character varying(50),
    location_city character varying(50),
    location_state character(2),
    location_zip character(5),
    star_rating numeric(3,1),
    star_count integer
);


ALTER TABLE public.cms_sites OWNER TO phpuser;

--
-- Name: cms_sites_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_sites_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_sites_id_seq OWNER TO phpuser;

--
-- Name: cms_sites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_sites_id_seq OWNED BY public.cms_sites.id;


--
-- Name: cms_slide_show_slides; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_slide_show_slides (
    id bigint NOT NULL,
    slide_show_id bigint,
    sort_order bigint,
    duration bigint,
    content text
);


ALTER TABLE public.cms_slide_show_slides OWNER TO phpuser;

--
-- Name: cms_slide_show_slides_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_slide_show_slides_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_slide_show_slides_id_seq OWNER TO phpuser;

--
-- Name: cms_slide_show_slides_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_slide_show_slides_id_seq OWNED BY public.cms_slide_show_slides.id;


--
-- Name: cms_slide_shows; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_slide_shows (
    id bigint NOT NULL,
    slug text,
    description text,
    css_class text
);


ALTER TABLE public.cms_slide_shows OWNER TO phpuser;

--
-- Name: cms_slide_shows_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_slide_shows_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_slide_shows_id_seq OWNER TO phpuser;

--
-- Name: cms_slide_shows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_slide_shows_id_seq OWNED BY public.cms_slide_shows.id;


--
-- Name: cms_slp_data; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_slp_data (
    id bigint NOT NULL,
    slp_slug text,
    page_slug text,
    geo_1 text,
    geo_2 text,
    energy_type text,
    var_1 text,
    sitemap_title text,
    sitemap_category text,
    market_id smallint NOT NULL
);


ALTER TABLE public.cms_slp_data OWNER TO phpuser;

--
-- Name: cms_slp_data_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_slp_data_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_slp_data_id_seq OWNER TO phpuser;

--
-- Name: cms_slp_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_slp_data_id_seq OWNED BY public.cms_slp_data.id;


--
-- Name: cms_states; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_states (
    id bigint NOT NULL,
    name character varying(40) NOT NULL,
    abbrev character varying(2) NOT NULL
);


ALTER TABLE public.cms_states OWNER TO phpuser;

--
-- Name: cms_states_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_states_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_states_id_seq OWNER TO phpuser;

--
-- Name: cms_states_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_states_id_seq OWNED BY public.cms_states.id;


--
-- Name: cms_tab_to_bundle; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_tab_to_bundle (
    id bigint NOT NULL,
    tab_id bigint,
    bundle_id bigint,
    "order" bigint
);


ALTER TABLE public.cms_tab_to_bundle OWNER TO phpuser;

--
-- Name: cms_tab_to_bundle_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_tab_to_bundle_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_tab_to_bundle_id_seq OWNER TO phpuser;

--
-- Name: cms_tab_to_bundle_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_tab_to_bundle_id_seq OWNED BY public.cms_tab_to_bundle.id;


--
-- Name: cms_tab_to_rep; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_tab_to_rep (
    id bigint NOT NULL,
    tab_id bigint,
    rep_id bigint
);


ALTER TABLE public.cms_tab_to_rep OWNER TO phpuser;

--
-- Name: cms_tab_to_rep_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_tab_to_rep_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_tab_to_rep_id_seq OWNER TO phpuser;

--
-- Name: cms_tab_to_rep_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_tab_to_rep_id_seq OWNED BY public.cms_tab_to_rep.id;


--
-- Name: cms_tabs; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_tabs (
    id bigint NOT NULL,
    grid_id bigint,
    name text,
    label text,
    "order" bigint,
    style text,
    label_style text,
    viewall character varying(1)
);


ALTER TABLE public.cms_tabs OWNER TO phpuser;

--
-- Name: cms_tabs_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_tabs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_tabs_id_seq OWNER TO phpuser;

--
-- Name: cms_tabs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_tabs_id_seq OWNED BY public.cms_tabs.id;


--
-- Name: cms_templates; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_templates (
    id bigint NOT NULL,
    name text
);


ALTER TABLE public.cms_templates OWNER TO phpuser;

--
-- Name: cms_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_templates_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_templates_id_seq OWNER TO phpuser;

--
-- Name: cms_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_templates_id_seq OWNED BY public.cms_templates.id;


--
-- Name: cms_testimonials; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_testimonials (
    id bigint NOT NULL,
    content text,
    person_name text,
    person_location text
);


ALTER TABLE public.cms_testimonials OWNER TO phpuser;

--
-- Name: cms_testimonials_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_testimonials_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_testimonials_id_seq OWNER TO phpuser;

--
-- Name: cms_testimonials_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_testimonials_id_seq OWNED BY public.cms_testimonials.id;


--
-- Name: cms_users; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.cms_users (
    id bigint NOT NULL,
    username text,
    password text
);


ALTER TABLE public.cms_users OWNER TO phpuser;

--
-- Name: cms_users_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.cms_users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cms_users_id_seq OWNER TO phpuser;

--
-- Name: cms_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.cms_users_id_seq OWNED BY public.cms_users.id;


--
-- Name: commercial; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.commercial (
    id bigint NOT NULL,
    company_name text,
    email text NOT NULL,
    first_name text,
    last_name text,
    phone text,
    zip_code text,
    monthly_bill text,
    ctime timestamp with time zone,
    email_sent character varying(255) DEFAULT 'n'::character varying,
    recipients text,
    sent_time timestamp with time zone,
    commodity text,
    state text
);


ALTER TABLE public.commercial OWNER TO phpuser;

--
-- Name: commercial_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.commercial_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.commercial_id_seq OWNER TO phpuser;

--
-- Name: commercial_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.commercial_id_seq OWNED BY public.commercial.id;


--
-- Name: commission_structures; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.commission_structures (
    id bigint NOT NULL,
    rep_id bigint,
    state text DEFAULT ''::text NOT NULL,
    commodity character varying(1),
    start_date date,
    end_date date,
    upfront numeric(7,2),
    mills numeric(7,2),
    promo_code character varying(50)
);


ALTER TABLE public.commission_structures OWNER TO phpuser;

--
-- Name: commission_structures_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.commission_structures_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.commission_structures_id_seq OWNER TO phpuser;

--
-- Name: commission_structures_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.commission_structures_id_seq OWNED BY public.commission_structures.id;


--
-- Name: company_logs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.company_logs (
    id bigint,
    company_id bigint,
    agent_id bigint,
    message text,
    ticket_id bigint
);


ALTER TABLE public.company_logs OWNER TO postgres;

--
-- Name: company_plans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.company_plans (
    id bigint,
    company_id bigint,
    plan_id integer
);


ALTER TABLE public.company_plans OWNER TO postgres;

--
-- Name: company_role_plans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.company_role_plans (
    id bigint,
    company_role_id bigint,
    plan_id integer,
    sort_order integer
);


ALTER TABLE public.company_role_plans OWNER TO postgres;

--
-- Name: company_roles; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.company_roles (
    id bigint,
    company_id bigint,
    name character varying(100),
    tx integer,
    ct integer,
    ny integer,
    ga integer,
    ca integer,
    nj integer,
    il integer,
    mi integer,
    oh integer,
    pa integer,
    md integer,
    ri integer,
    ma integer
);


ALTER TABLE public.company_roles OWNER TO postgres;

--
-- Name: companys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.companys (
    id bigint,
    name character varying(100),
    code character varying(100),
    upfront_cost numeric(12,2) DEFAULT 0.00,
    max_users integer,
    flowing_cost numeric(12,2) DEFAULT 0.00,
    clawback_cost numeric(12,2) DEFAULT 0.00,
    accepted_cost numeric(6,2) DEFAULT 0.00,
    tpvcomplete_cost numeric(6,2) DEFAULT 0.00,
    upfront_cost_gas numeric(6,2),
    flowing_cost_gas numeric(6,2),
    accepted_cost_gas numeric(6,2),
    tpvcomplete_cost_gas numeric(6,2),
    clawback_cost_gas numeric(6,2),
    pay_schedule character varying(20),
    payment_bank numeric(12,2)
);


ALTER TABLE public.companys OWNER TO postgres;

--
-- Name: cron_logs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.cron_logs (
    id bigint,
    cron character varying(100),
    start_time timestamp without time zone,
    end_time timestamp without time zone,
    last_updated timestamp without time zone,
    run_seconds bigint
);


ALTER TABLE public.cron_logs OWNER TO postgres;

--
-- Name: dirty_items; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.dirty_items (
    item_id bigint
);


ALTER TABLE public.dirty_items OWNER TO postgres;

--
-- Name: eia_data; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.eia_data (
    id bigint NOT NULL,
    name text,
    commodity character varying(1),
    state character varying(2),
    year bigint,
    month bigint,
    value numeric(20,4),
    as_of timestamp with time zone
);


ALTER TABLE public.eia_data OWNER TO phpuser;

--
-- Name: eia_data_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.eia_data_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.eia_data_id_seq OWNER TO phpuser;

--
-- Name: eia_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.eia_data_id_seq OWNED BY public.eia_data.id;


--
-- Name: eia_generators; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.eia_generators (
    id bigint,
    key character varying(50),
    state character(2),
    county character varying(50),
    type character varying(100),
    capacity numeric(12,6),
    birthday date,
    status character varying(10),
    green character(1) DEFAULT 'n'::bpchar NOT NULL,
    updated character(1) DEFAULT 'n'::bpchar NOT NULL,
    year integer,
    latitude numeric(12,8),
    longitude numeric(12,8)
);


ALTER TABLE public.eia_generators OWNER TO postgres;

--
-- Name: email_dump; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.email_dump (
    id bigint NOT NULL,
    email character varying(50),
    site_id smallint DEFAULT 0 NOT NULL,
    exported character(1) DEFAULT 'n'::bpchar NOT NULL,
    created timestamp without time zone,
    quarterly_sent timestamp without time zone,
    daily_sent timestamp without time zone,
    myacct_sent timestamp without time zone,
    churn_sent timestamp without time zone,
    unsubscribe character varying(50)
);


ALTER TABLE public.email_dump OWNER TO postgres;

--
-- Name: email_dump_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.email_dump_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.email_dump_id_seq OWNER TO postgres;

--
-- Name: email_dump_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.email_dump_id_seq OWNED BY public.email_dump.id;


--
-- Name: geo_data; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.geo_data (
    id bigint NOT NULL,
    zipcode character varying(6),
    ziptype character varying(1),
    cityname text,
    citytype character varying(1),
    countyname text,
    countyfips character varying(5),
    statename text,
    stateabbr character varying(2),
    statefips character varying(2),
    msacode character varying(4),
    areacode text,
    timezone text,
    utc double precision,
    dst character varying(1),
    latitude numeric(20,0),
    longitude numeric(20,0),
    population bigint
);


ALTER TABLE public.geo_data OWNER TO phpuser;

--
-- Name: geo_data_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.geo_data_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.geo_data_id_seq OWNER TO phpuser;

--
-- Name: geo_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.geo_data_id_seq OWNED BY public.geo_data.id;


--
-- Name: geo_data_other; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.geo_data_other (
    id bigint DEFAULT '0'::bigint NOT NULL,
    zipcode character varying(6),
    ziptype character varying(1),
    cityname text,
    citytype character varying(1),
    countyname text,
    countyfips character varying(5),
    statename text,
    stateabbr character varying(2),
    statefips character varying(2),
    msacode character varying(4),
    areacode text,
    timezone text,
    utc double precision,
    dst character varying(1),
    latitude numeric(20,0),
    longitude numeric(20,0),
    population bigint
);


ALTER TABLE public.geo_data_other OWNER TO phpuser;

--
-- Name: google_analytics; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.google_analytics (
    id bigint NOT NULL,
    view_date date,
    type text,
    impressions bigint,
    sessions bigint,
    keyword text,
    page_url text,
    state character varying(2)
);


ALTER TABLE public.google_analytics OWNER TO phpuser;

--
-- Name: google_analytics_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.google_analytics_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.google_analytics_id_seq OWNER TO phpuser;

--
-- Name: google_analytics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.google_analytics_id_seq OWNED BY public.google_analytics.id;


--
-- Name: historical_order_averages; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.historical_order_averages (
    id bigint NOT NULL,
    state character varying(2),
    commodity character varying(1),
    order_date date,
    rep_id bigint,
    market_id bigint,
    average_rate numeric(12,6),
    average_term numeric(12,6),
    orders bigint,
    declined bigint
);


ALTER TABLE public.historical_order_averages OWNER TO phpuser;

--
-- Name: historical_order_averages_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.historical_order_averages_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.historical_order_averages_id_seq OWNER TO phpuser;

--
-- Name: historical_order_averages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.historical_order_averages_id_seq OWNED BY public.historical_order_averages.id;


--
-- Name: items; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.items (
    id bigint,
    error_log text
);


ALTER TABLE public.items OWNER TO postgres;

--
-- Name: item_accountings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accountings (
    period integer,
    effective_date date,
    type character varying(50),
    vendor character varying(100),
    state character varying(2),
    amount numeric(12,2),
    ticket_id bigint,
    item_id bigint,
    label character varying(30),
    journal_entry_id bigint,
    entity character varying(100)
)
INHERITS (public.items);


ALTER TABLE public.item_accountings OWNER TO postgres;

--
-- Name: item_accounting_bookings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accounting_bookings (
)
INHERITS (public.item_accountings);


ALTER TABLE public.item_accounting_bookings OWNER TO postgres;

--
-- Name: item_accounting_costs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accounting_costs (
)
INHERITS (public.item_accountings);


ALTER TABLE public.item_accounting_costs OWNER TO postgres;

--
-- Name: item_accounting_cost_allowances; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accounting_cost_allowances (
    max_allowance numeric(12,2),
    manual character(1) DEFAULT 'n'::bpchar NOT NULL
)
INHERITS (public.item_accounting_costs);


ALTER TABLE public.item_accounting_cost_allowances OWNER TO postgres;

--
-- Name: item_accounting_cost_ppcs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accounting_cost_ppcs (
    impressions integer,
    "position" numeric(5,2),
    clicks integer,
    ctr numeric(5,2),
    cpc numeric(5,2)
)
INHERITS (public.item_accounting_costs);


ALTER TABLE public.item_accounting_cost_ppcs OWNER TO postgres;

--
-- Name: item_accounting_revenues; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accounting_revenues (
)
INHERITS (public.item_accountings);


ALTER TABLE public.item_accounting_revenues OWNER TO postgres;

--
-- Name: item_accounting_revenue_residuals; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accounting_revenue_residuals (
)
INHERITS (public.item_accounting_revenues);


ALTER TABLE public.item_accounting_revenue_residuals OWNER TO postgres;

--
-- Name: item_accounting_revenue_upfronts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_accounting_revenue_upfronts (
)
INHERITS (public.item_accounting_revenues);


ALTER TABLE public.item_accounting_revenue_upfronts OWNER TO postgres;

--
-- Name: item_chat_auto_phrases; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_chat_auto_phrases (
    phrase character varying(255),
    chat_id bigint
)
INHERITS (public.items);


ALTER TABLE public.item_chat_auto_phrases OWNER TO postgres;

--
-- Name: item_chat_auto_urls; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_chat_auto_urls (
    url character varying(255),
    chat_id bigint,
    wait_seconds integer
)
INHERITS (public.items);


ALTER TABLE public.item_chat_auto_urls OWNER TO postgres;

--
-- Name: item_chat_autos; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_chat_autos (
    parent_id bigint,
    name character varying(255),
    message text
)
INHERITS (public.items);


ALTER TABLE public.item_chat_autos OWNER TO postgres;

--
-- Name: item_chats; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_chats (
    author character(1),
    seen_agent character(1) DEFAULT 'n'::bpchar NOT NULL,
    seen_user character(1) DEFAULT 'n'::bpchar NOT NULL,
    message text,
    user_id bigint,
    seen_window character(1) DEFAULT 'n'::bpchar NOT NULL,
    auto_id bigint
)
INHERITS (public.items);


ALTER TABLE public.item_chats OWNER TO postgres;

--
-- Name: item_checkouts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkouts (
)
INHERITS (public.items);


ALTER TABLE public.item_checkouts OWNER TO postgres;

--
-- Name: item_checkout_carts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_carts (
    user_mouse_x integer,
    user_mouse_y integer,
    agent_mouse_x integer,
    agent_mouse_y integer,
    refresh_user character(1),
    refresh_agent character(1),
    user_field character varying(255),
    agent_field character varying(255)
)
INHERITS (public.item_checkouts);


ALTER TABLE public.item_checkout_carts OWNER TO postgres;

--
-- Name: item_checkout_cart_mobiles; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_mobiles (
    max_page integer,
    current_page integer,
    current_page_label character varying(100),
    max_page_label character varying(100),
    single_page character(1) DEFAULT 'n'::bpchar NOT NULL
)
INHERITS (public.item_checkout_carts);


ALTER TABLE public.item_checkout_cart_mobiles OWNER TO postgres;

--
-- Name: item_checkout_cart_mobile_pages; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_mobile_pages (
)
INHERITS (public.item_checkout_cart_mobiles);


ALTER TABLE public.item_checkout_cart_mobile_pages OWNER TO postgres;

--
-- Name: item_checkout_cart_mobile_stackeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_mobile_stackeds (
)
INHERITS (public.item_checkout_cart_mobiles);


ALTER TABLE public.item_checkout_cart_mobile_stackeds OWNER TO postgres;

--
-- Name: item_checkout_cart_mobile_stacked_myaccounts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_mobile_stacked_myaccounts (
)
INHERITS (public.item_checkout_cart_mobile_stackeds);


ALTER TABLE public.item_checkout_cart_mobile_stacked_myaccounts OWNER TO postgres;

--
-- Name: item_checkout_cart_single; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_single (
)
INHERITS (public.item_checkout_carts);


ALTER TABLE public.item_checkout_cart_single OWNER TO postgres;

--
-- Name: item_checkout_cart_singles; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_singles (
)
INHERITS (public.item_checkout_carts);


ALTER TABLE public.item_checkout_cart_singles OWNER TO postgres;

--
-- Name: item_checkout_cart_split; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_split (
)
INHERITS (public.item_checkout_carts);


ALTER TABLE public.item_checkout_cart_split OWNER TO postgres;

--
-- Name: item_checkout_cart_splits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_splits (
)
INHERITS (public.item_checkout_carts);


ALTER TABLE public.item_checkout_cart_splits OWNER TO postgres;

--
-- Name: item_checkout_cart_split_credits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_cart_split_credits (
)
INHERITS (public.item_checkout_cart_splits);


ALTER TABLE public.item_checkout_cart_split_credits OWNER TO postgres;

--
-- Name: item_checkout_externals; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_externals (
)
INHERITS (public.item_checkouts);


ALTER TABLE public.item_checkout_externals OWNER TO postgres;

--
-- Name: item_checkout_external_carts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_external_carts (
)
INHERITS (public.item_checkout_externals);


ALTER TABLE public.item_checkout_external_carts OWNER TO postgres;

--
-- Name: item_checkout_external_phones; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_external_phones (
)
INHERITS (public.item_checkout_externals);


ALTER TABLE public.item_checkout_external_phones OWNER TO postgres;

--
-- Name: item_checkout_external_unknowns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_checkout_external_unknowns (
)
INHERITS (public.item_checkout_externals);


ALTER TABLE public.item_checkout_external_unknowns OWNER TO postgres;

--
-- Name: item_commission_structures; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_commission_structures (
    company_id bigint,
    type character varying(25),
    value_dollars numeric(7,3),
    value_percent integer,
    commodity character varying(1),
    customer_type character varying(1),
    term_length integer,
    prepaid character varying(1),
    state character varying(2)
)
INHERITS (public.items);


ALTER TABLE public.item_commission_structures OWNER TO postgres;

--
-- Name: item_commissions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_commissions (
    rep_id integer,
    amount numeric(10,2),
    period character(6),
    commodity character(1) DEFAULT 'e'::bpchar NOT NULL,
    amount_offset numeric(10,2)
)
INHERITS (public.items);


ALTER TABLE public.item_commissions OWNER TO postgres;

--
-- Name: item_commission_upfronts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_commission_upfronts (
)
INHERITS (public.item_commissions);


ALTER TABLE public.item_commission_upfronts OWNER TO postgres;

--
-- Name: item_commission_usages; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_commission_usages (
    commodity character(1) DEFAULT 'e'::bpchar,
    start_date date,
    end_date date,
    usage numeric(10,2),
    bill_pk character varying(40)
)
INHERITS (public.item_commissions);


ALTER TABLE public.item_commission_usages OWNER TO postgres;

--
-- Name: item_costs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_costs (
    amount numeric(12,2),
    period integer,
    vendor_id bigint,
    ticket_id bigint,
    agent_id bigint,
    paid character(1) DEFAULT 'n'::bpchar NOT NULL,
    paid_date date
)
INHERITS (public.items);


ALTER TABLE public.item_costs OWNER TO postgres;

--
-- Name: item_cost_clawbacks; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_cost_clawbacks (
)
INHERITS (public.item_costs);


ALTER TABLE public.item_cost_clawbacks OWNER TO postgres;

--
-- Name: item_cost_flowings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_cost_flowings (
)
INHERITS (public.item_costs);


ALTER TABLE public.item_cost_flowings OWNER TO postgres;

--
-- Name: item_cost_upfronts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_cost_upfronts (
)
INHERITS (public.item_costs);


ALTER TABLE public.item_cost_upfronts OWNER TO postgres;

--
-- Name: item_electricitys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricitys (
    state character varying(50),
    market_id integer,
    move_switch character varying(20),
    move_switch_date date,
    move_switch_expedite character varying(10),
    plan_id bigint,
    plan_name character varying(100),
    plan_rate numeric(10,4),
    plan_term integer,
    plan_etf numeric(10,2),
    plan_yrac_url character varying(400),
    plan_efl_url character varying(400),
    plan_partner_plan_id character varying(255),
    plan_partner_product_id character varying(255),
    partner_order_status character varying(255),
    partner_order_id character varying(50),
    flag_accepted character varying(1),
    flag_deposit_due character varying(1),
    flag_balance_due character varying(1),
    flag_payment_due character varying(1),
    flag_fraud_potential character varying(1),
    flag_service_down character varying(1),
    flag_cancelled character varying(1),
    deposit_amt numeric(10,4),
    payment_amt numeric(10,4),
    mills numeric(5,3),
    up_front numeric(10,2),
    hold_order integer,
    critical_care character(1),
    flag_prepared_cart character(1),
    flag_tpv_cart character(1),
    rate_shown integer,
    promo_code character varying(50),
    amount_paid numeric(9,2),
    annual_usage integer,
    plan_partner_rate_id character varying(255),
    original_click_data text,
    balance_amt numeric(10,4),
    flag_order_valid character(1),
    commodity character(1),
    e_sig character varying(255),
    e_sig_date date,
    plan_click_id bigint,
    partner_account_id character varying(50),
    plan_price_structure text,
    plan_market_id integer,
    flag_switchhold character varying(1),
    own_rent character varying(10),
    flag_existing_customer character(1),
    docusign_url text,
    flag_apartment character(1),
    rep_id integer,
    flag_other_plans character(1),
    other_plan_ids text,
    plan_rate_bill numeric(10,2),
    plan_rate_bill_estimate numeric(10,2),
    covid text,
    five_plan_id integer
)
INHERITS (public.items);


ALTER TABLE public.item_electricitys OWNER TO postgres;

--
-- Name: item_electricity_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_leads (
)
INHERITS (public.item_electricitys);


ALTER TABLE public.item_electricity_leads OWNER TO postgres;

--
-- Name: item_electricity_lead_dtvs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_lead_dtvs (
    rooms character varying(10),
    dvrs character varying(10)
)
INHERITS (public.item_electricity_leads);


ALTER TABLE public.item_electricity_lead_dtvs OWNER TO postgres;

--
-- Name: item_electricity_lead_solars; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_lead_solars (
)
INHERITS (public.item_electricity_leads);


ALTER TABLE public.item_electricity_lead_solars OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexass; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexass (
)
INHERITS (public.item_electricitys);


ALTER TABLE public.item_electricity_partner_energytexass OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexass; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexass (
)
INHERITS (public.item_electricity_partner_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexass OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_cas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_cas (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_cas OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_cts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_cts (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_cts OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_gas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_gas (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_gas OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_ils; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_ils (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_ils OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_mas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_mas (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_mas OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_mds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_mds (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_mds OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_mis; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_mis (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_mis OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_nhs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_nhs (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_nhs OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_njs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_njs (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_njs OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_nys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_nys (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_nys OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_ohs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_ohs (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_ohs OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_pas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_pas (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_pas OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_ris; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_ris (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_ris OWNER TO postgres;

--
-- Name: item_electricity_partner_energytexas_brand_energytexas_txs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_electricity_partner_energytexas_brand_energytexas_txs (
)
INHERITS (public.item_electricity_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_electricity_partner_energytexas_brand_energytexas_txs OWNER TO postgres;

--
-- Name: item_emails; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_emails (
    fingerprint character varying(255),
    send_with_us_key character varying(50),
    cmd text,
    opened character(1) DEFAULT 'n'::bpchar NOT NULL,
    clicked character(1) DEFAULT 'n'::bpchar NOT NULL,
    dropped character(1) DEFAULT 'n'::bpchar NOT NULL,
    last_updated bigint DEFAULT 0 NOT NULL
)
INHERITS (public.items);


ALTER TABLE public.item_emails OWNER TO postgres;

--
-- Name: item_email_commercial_contracts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_commercial_contracts (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_commercial_contracts OWNER TO postgres;

--
-- Name: item_email_commercial_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_commercial_leads (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_commercial_leads OWNER TO postgres;

--
-- Name: item_email_confirmations; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_confirmations (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_confirmations OWNER TO postgres;

--
-- Name: item_email_confirmation_commercials; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_confirmation_commercials (
)
INHERITS (public.item_email_confirmations);


ALTER TABLE public.item_email_confirmation_commercials OWNER TO postgres;

--
-- Name: item_email_confirmation_commercial_contracts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_confirmation_commercial_contracts (
)
INHERITS (public.item_email_confirmation_commercials);


ALTER TABLE public.item_email_confirmation_commercial_contracts OWNER TO postgres;

--
-- Name: item_email_customs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_customs (
    custom_text text,
    to_email text,
    subject character varying(255)
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_customs OWNER TO postgres;

--
-- Name: item_email_depositcrosssells; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_depositcrosssells (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_depositcrosssells OWNER TO postgres;

--
-- Name: item_email_docusigns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_docusigns (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_docusigns OWNER TO postgres;

--
-- Name: item_email_drips; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_drips (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_drips OWNER TO postgres;

--
-- Name: item_email_drip_captures; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_drip_captures (
)
INHERITS (public.item_email_drips);


ALTER TABLE public.item_email_drip_captures OWNER TO postgres;

--
-- Name: item_email_drip_churns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_drip_churns (
)
INHERITS (public.item_email_drips);


ALTER TABLE public.item_email_drip_churns OWNER TO postgres;

--
-- Name: item_email_drip_churn_polrs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_drip_churn_polrs (
)
INHERITS (public.item_email_drip_churns);


ALTER TABLE public.item_email_drip_churn_polrs OWNER TO postgres;

--
-- Name: item_email_dtv_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_dtv_leads (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_dtv_leads OWNER TO postgres;

--
-- Name: item_email_errors; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_errors (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_errors OWNER TO postgres;

--
-- Name: item_email_google_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_google_reviews (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_google_reviews OWNER TO postgres;

--
-- Name: item_email_hold_order_notifications; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_hold_order_notifications (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_hold_order_notifications OWNER TO postgres;

--
-- Name: item_email_hold_orders; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_hold_orders (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_hold_orders OWNER TO postgres;

--
-- Name: item_email_hold_order_reminders; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_hold_order_reminders (
)
INHERITS (public.item_email_hold_orders);


ALTER TABLE public.item_email_hold_order_reminders OWNER TO postgres;

--
-- Name: item_email_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_leads (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_leads OWNER TO postgres;

--
-- Name: item_email_lead_dtvs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_lead_dtvs (
)
INHERITS (public.item_email_leads);


ALTER TABLE public.item_email_lead_dtvs OWNER TO postgres;

--
-- Name: item_email_myaccounts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_myaccounts (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_myaccounts OWNER TO postgres;

--
-- Name: item_email_myaccount_claim_rafs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_myaccount_claim_rafs (
)
INHERITS (public.item_email_myaccounts);


ALTER TABLE public.item_email_myaccount_claim_rafs OWNER TO postgres;

--
-- Name: item_email_myaccount_contract_expirations; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_myaccount_contract_expirations (
)
INHERITS (public.item_email_myaccounts);


ALTER TABLE public.item_email_myaccount_contract_expirations OWNER TO postgres;

--
-- Name: item_email_myaccount_rafs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_myaccount_rafs (
)
INHERITS (public.item_email_myaccounts);


ALTER TABLE public.item_email_myaccount_rafs OWNER TO postgres;

--
-- Name: item_email_myaccount_registers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_myaccount_registers (
)
INHERITS (public.item_email_myaccounts);


ALTER TABLE public.item_email_myaccount_registers OWNER TO postgres;

--
-- Name: item_email_myaccount_renewals; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_myaccount_renewals (
)
INHERITS (public.item_email_myaccounts);


ALTER TABLE public.item_email_myaccount_renewals OWNER TO postgres;

--
-- Name: item_email_order_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_order_cancelleds (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_order_cancelleds OWNER TO postgres;

--
-- Name: item_email_orderss; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_orderss (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_orderss OWNER TO postgres;

--
-- Name: item_email_outbox_notifications; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_outbox_notifications (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_outbox_notifications OWNER TO postgres;

--
-- Name: item_email_outboxs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_outboxs (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_outboxs OWNER TO postgres;

--
-- Name: item_email_partial_carts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_partial_carts (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_partial_carts OWNER TO postgres;

--
-- Name: item_email_partial_cart_firsts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_partial_cart_firsts (
)
INHERITS (public.item_email_partial_carts);


ALTER TABLE public.item_email_partial_cart_firsts OWNER TO postgres;

--
-- Name: item_email_partial_cart_seconds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_partial_cart_seconds (
)
INHERITS (public.item_email_partial_carts);


ALTER TABLE public.item_email_partial_cart_seconds OWNER TO postgres;

--
-- Name: item_email_partial_cart_thirds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_partial_cart_thirds (
)
INHERITS (public.item_email_partial_carts);


ALTER TABLE public.item_email_partial_cart_thirds OWNER TO postgres;

--
-- Name: item_email_prepared_cart_reminders; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_prepared_cart_reminders (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_prepared_cart_reminders OWNER TO postgres;

--
-- Name: item_email_prepared_carts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_prepared_carts (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_prepared_carts OWNER TO postgres;

--
-- Name: item_email_rate_receiveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_rate_receiveds (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_rate_receiveds OWNER TO postgres;

--
-- Name: item_email_rejecteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_rejecteds (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_rejecteds OWNER TO postgres;

--
-- Name: item_email_renewals; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_renewals (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_renewals OWNER TO postgres;

--
-- Name: item_email_rep_questionnaires; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_rep_questionnaires (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_rep_questionnaires OWNER TO postgres;

--
-- Name: item_email_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_reviews (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_reviews OWNER TO postgres;

--
-- Name: item_email_review_approveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_review_approveds (
)
INHERITS (public.item_email_reviews);


ALTER TABLE public.item_email_review_approveds OWNER TO postgres;

--
-- Name: item_email_review_comment_ters; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_review_comment_ters (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_review_comment_ters OWNER TO postgres;

--
-- Name: item_email_review_comments; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_review_comments (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_review_comments OWNER TO postgres;

--
-- Name: item_email_review_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_review_pendings (
)
INHERITS (public.item_email_reviews);


ALTER TABLE public.item_email_review_pendings OWNER TO postgres;

--
-- Name: item_email_review_receiveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_review_receiveds (
)
INHERITS (public.item_email_reviews);


ALTER TABLE public.item_email_review_receiveds OWNER TO postgres;

--
-- Name: item_email_solar_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_solar_leads (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_solar_leads OWNER TO postgres;

--
-- Name: item_email_write_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_email_write_reviews (
)
INHERITS (public.item_emails);


ALTER TABLE public.item_email_write_reviews OWNER TO postgres;

--
-- Name: item_files; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_files (
    file_type character varying(5),
    file_size integer,
    file_name text,
    file_path text
)
INHERITS (public.items);


ALTER TABLE public.item_files OWNER TO postgres;

--
-- Name: item_file_customer_uploads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_customer_uploads (
)
INHERITS (public.item_files);


ALTER TABLE public.item_file_customer_uploads OWNER TO postgres;

--
-- Name: item_file_emails; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_emails (
)
INHERITS (public.item_files);


ALTER TABLE public.item_file_emails OWNER TO postgres;

--
-- Name: item_file_legals; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_legals (
)
INHERITS (public.item_files);


ALTER TABLE public.item_file_legals OWNER TO postgres;

--
-- Name: item_file_phonecalls; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_phonecalls (
    phone character varying(20),
    call_date timestamp without time zone
)
INHERITS (public.item_files);


ALTER TABLE public.item_file_phonecalls OWNER TO postgres;

--
-- Name: item_file_phonecall_dcs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_phonecall_dcs (
    original_path_hash character varying(255)
)
INHERITS (public.item_file_phonecalls);


ALTER TABLE public.item_file_phonecall_dcs OWNER TO postgres;

--
-- Name: item_file_phonecall_fivenines; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_phonecall_fivenines (
)
INHERITS (public.item_file_phonecalls);


ALTER TABLE public.item_file_phonecall_fivenines OWNER TO postgres;

--
-- Name: item_file_phonecall_ivrs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_phonecall_ivrs (
    campaign character varying(100),
    disposition character varying(50),
    dnis character varying(20),
    call_seconds integer,
    ivr_path text
)
INHERITS (public.item_file_phonecalls);


ALTER TABLE public.item_file_phonecall_ivrs OWNER TO postgres;

--
-- Name: item_file_phonecall_primes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_phonecall_primes (
)
INHERITS (public.item_file_phonecalls);


ALTER TABLE public.item_file_phonecall_primes OWNER TO postgres;

--
-- Name: item_file_phonecall_trusteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_phonecall_trusteds (
)
INHERITS (public.item_file_phonecalls);


ALTER TABLE public.item_file_phonecall_trusteds OWNER TO postgres;

--
-- Name: item_file_phonecall_vsynergizes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_phonecall_vsynergizes (
)
INHERITS (public.item_file_phonecalls);


ALTER TABLE public.item_file_phonecall_vsynergizes OWNER TO postgres;

--
-- Name: item_file_screenshots; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_screenshots (
)
INHERITS (public.item_files);


ALTER TABLE public.item_file_screenshots OWNER TO postgres;

--
-- Name: item_file_texts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_texts (
)
INHERITS (public.item_files);


ALTER TABLE public.item_file_texts OWNER TO postgres;

--
-- Name: item_file_uploads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_uploads (
    cis_user character varying(20)
)
INHERITS (public.item_files);


ALTER TABLE public.item_file_uploads OWNER TO postgres;

--
-- Name: item_file_upload_amazons; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_upload_amazons (
)
INHERITS (public.item_file_uploads);


ALTER TABLE public.item_file_upload_amazons OWNER TO postgres;

--
-- Name: item_file_upload_ftps; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_upload_ftps (
    ftp_host character varying(255),
    ftp_username character varying(255),
    ftp_password character varying(255),
    ftp_path character varying(255)
)
INHERITS (public.item_file_uploads);


ALTER TABLE public.item_file_upload_ftps OWNER TO postgres;

--
-- Name: item_file_upload_orderss; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_file_upload_orderss (
)
INHERITS (public.item_file_uploads);


ALTER TABLE public.item_file_upload_orderss OWNER TO postgres;

--
-- Name: item_giftcards; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_giftcards (
    amount numeric(10,2),
    reference_id bigint,
    reference character varying(255),
    earned character(1),
    claimed character(1),
    paid character(1)
)
INHERITS (public.items);


ALTER TABLE public.item_giftcards OWNER TO postgres;

--
-- Name: item_giftcard_rafs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_giftcard_rafs (
)
INHERITS (public.item_giftcards);


ALTER TABLE public.item_giftcard_rafs OWNER TO postgres;

--
-- Name: item_lists; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_lists (
    value character varying(255)
)
INHERITS (public.items);


ALTER TABLE public.item_lists OWNER TO postgres;

--
-- Name: item_list_company_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_company_leads (
    company_id bigint
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_company_leads OWNER TO postgres;

--
-- Name: item_list_dncs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_dncs (
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_dncs OWNER TO postgres;

--
-- Name: item_list_email_presets; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_email_presets (
    html text
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_email_presets OWNER TO postgres;

--
-- Name: item_list_five_docs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_five_docs (
    rep_id integer,
    provider character varying(50),
    state character(2),
    commodity character(1),
    market character varying(50),
    market_id integer,
    demand_min integer,
    demand_max integer,
    usage_min integer,
    usage_max integer,
    updated character(1) DEFAULT 'y'::bpchar NOT NULL
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_five_docs OWNER TO postgres;

--
-- Name: item_list_five_markets; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_five_markets (
    five_id integer
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_five_markets OWNER TO postgres;

--
-- Name: item_list_five_partners; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_five_partners (
    five_id integer
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_five_partners OWNER TO postgres;

--
-- Name: item_list_five_rep_names; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_five_rep_names (
    rep_id integer
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_five_rep_names OWNER TO postgres;

--
-- Name: item_list_orders_flowings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_orders_flowings (
    "row" text,
    recalc character(1)
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_orders_flowings OWNER TO postgres;

--
-- Name: item_list_serviceability_consty_acs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_serviceability_consty_acs (
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_serviceability_consty_acs OWNER TO postgres;

--
-- Name: item_list_serviceability_constys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_serviceability_constys (
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_serviceability_constys OWNER TO postgres;

--
-- Name: item_list_serviceabilitys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_serviceabilitys (
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_serviceabilitys OWNER TO postgres;

--
-- Name: item_list_serviceability_scanas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_serviceability_scanas (
    pool character varying(10),
    updated character(1) DEFAULT 'n'::bpchar NOT NULL
)
INHERITS (public.item_list_serviceabilitys);


ALTER TABLE public.item_list_serviceability_scanas OWNER TO postgres;

--
-- Name: item_list_sms_presets; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_sms_presets (
    html text
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_sms_presets OWNER TO postgres;

--
-- Name: item_list_unsubscribes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_list_unsubscribes (
    reason character varying(255)
)
INHERITS (public.item_lists);


ALTER TABLE public.item_list_unsubscribes OWNER TO postgres;

--
-- Name: item_locations; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_locations (
    address_1 character varying(100),
    address_2 character varying(50),
    city character varying(50),
    state character varying(50),
    zip character varying(11),
    location_code character varying(255)
)
INHERITS (public.items);


ALTER TABLE public.item_locations OWNER TO postgres;

--
-- Name: item_location_commercial_usas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_commercial_usas (
    address_1 character varying(100),
    address_2 character varying(50),
    city character varying(50),
    state character varying(50),
    zip character varying(11),
    company_name character varying(100),
    monthly_bill character varying(100),
    fein character varying(100),
    monthly_usage character varying(100),
    dba character varying(100),
    title character varying(100),
    credit_type character varying(20),
    sq_ft integer,
    biz_type character varying(255),
    load_factor character varying(50),
    start_date date,
    market_id integer,
    mills integer,
    five_partner_name character varying(50),
    is_five character(1),
    load_zone character varying(50)
)
INHERITS (public.item_locations);


ALTER TABLE public.item_location_commercial_usas OWNER TO postgres;

--
-- Name: item_location_postals; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_postals (
)
INHERITS (public.item_locations);


ALTER TABLE public.item_location_postals OWNER TO postgres;

--
-- Name: item_location_postal_usas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_postal_usas (
    address_1 character varying(100),
    address_2 character varying(50),
    city character varying(50),
    state character varying(50),
    zip character varying(11)
)
INHERITS (public.item_location_postals);


ALTER TABLE public.item_location_postal_usas OWNER TO postgres;

--
-- Name: item_location_previouss; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_previouss (
)
INHERITS (public.item_locations);


ALTER TABLE public.item_location_previouss OWNER TO postgres;

--
-- Name: item_location_previous_usas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_previous_usas (
    address_1 character varying(100),
    address_2 character varying(50),
    city character varying(50),
    state character varying(50),
    zip character varying(11),
    previous_time integer,
    previous_val character(1)
)
INHERITS (public.item_location_previouss);


ALTER TABLE public.item_location_previous_usas OWNER TO postgres;

--
-- Name: item_location_solar_usas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_solar_usas (
    address_1 character varying(100),
    address_2 character varying(50),
    city character varying(50),
    state character varying(50),
    zip character varying(11),
    ownership character varying(10)
)
INHERITS (public.item_locations);


ALTER TABLE public.item_location_solar_usas OWNER TO postgres;

--
-- Name: item_location_utilitys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utilitys (
    address_1 character varying(100),
    address_2 character varying(50),
    city character varying(50),
    state character varying(50),
    zip character varying(11),
    uan1 character varying(50),
    uan2 character varying(50),
    uan3 character varying(50),
    uan4 character varying(50),
    uan5 character varying(50),
    market_id integer,
    start_date date
)
INHERITS (public.item_locations);


ALTER TABLE public.item_location_utilitys OWNER TO postgres;

--
-- Name: item_location_utility_californias; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_californias (
    meter_number character varying(50),
    utility_account_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_californias OWNER TO postgres;

--
-- Name: item_location_utility_connecticuts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_connecticuts (
    utility_account_number character varying(50),
    name_key character varying(50),
    service_reference_number character varying(50),
    pod_id character varying(20)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_connecticuts OWNER TO postgres;

--
-- Name: item_location_utility_dcs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_dcs (
    utility_account_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_dcs OWNER TO postgres;

--
-- Name: item_location_utility_delawares; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_delawares (
    authorization_id character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_delawares OWNER TO postgres;

--
-- Name: item_location_utility_georgias; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_georgias (
    meter_number character varying(30),
    tdsp character varying(30)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_georgias OWNER TO postgres;

--
-- Name: item_location_utility_illinoiss; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_illinoiss (
    meter_number character varying(50),
    utility_account_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_illinoiss OWNER TO postgres;

--
-- Name: item_location_utility_indianas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_indianas (
    meter_number character varying(50),
    utility_account_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_indianas OWNER TO postgres;

--
-- Name: item_location_utility_marylands; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_marylands (
    choice_id character varying(50),
    utility_account_number character varying(50),
    service_number character varying(50),
    customer_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_marylands OWNER TO postgres;

--
-- Name: item_location_utility_massachusettss; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_massachusettss (
    utility_account_number character varying(50),
    name_key character varying(50),
    meter_number character varying(50),
    service_reference_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_massachusettss OWNER TO postgres;

--
-- Name: item_location_utility_michigans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_michigans (
    utility_account_number character varying(50),
    meter_number character varying(50),
    pod_id character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_michigans OWNER TO postgres;

--
-- Name: item_location_utility_newhampshires; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_newhampshires (
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_newhampshires OWNER TO postgres;

--
-- Name: item_location_utility_newjerseys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_newjerseys (
    utility_account_number character varying(50),
    service_number character varying(50),
    customer_number character varying(50),
    service_agreement_id character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_newjerseys OWNER TO postgres;

--
-- Name: item_location_utility_newyorks; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_newyorks (
    utility_account_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_newyorks OWNER TO postgres;

--
-- Name: item_location_utility_ohios; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_ohios (
    utility_account_number character varying(50),
    service_delivery_id character varying(50),
    customer_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_ohios OWNER TO postgres;

--
-- Name: item_location_utility_pennsylvanias; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_pennsylvanias (
    utility_account_number character varying(50)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_pennsylvanias OWNER TO postgres;

--
-- Name: item_location_utility_rhodeislands; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_rhodeislands (
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_rhodeislands OWNER TO postgres;

--
-- Name: item_location_utility_texass; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_location_utility_texass (
    esiid character varying(30),
    tdsp character varying(30)
)
INHERITS (public.item_location_utilitys);


ALTER TABLE public.item_location_utility_texass OWNER TO postgres;

--
-- Name: item_myaccounts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_myaccounts (
)
INHERITS (public.items);


ALTER TABLE public.item_myaccounts OWNER TO postgres;

--
-- Name: item_myaccount_usages; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_myaccount_usages (
    start_date timestamp without time zone,
    end_date timestamp without time zone,
    amount numeric(12,1),
    cost numeric(12,2),
    estimate character(1) DEFAULT 'y'::bpchar NOT NULL,
    period character(6),
    commodity character(1),
    month integer
)
INHERITS (public.item_myaccounts);


ALTER TABLE public.item_myaccount_usages OWNER TO postgres;

--
-- Name: item_notes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_notes (
    user_id bigint,
    username character varying(50),
    note text
)
INHERITS (public.items);


ALTER TABLE public.item_notes OWNER TO postgres;

--
-- Name: item_partners; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partners (
    rep_id integer
)
INHERITS (public.items);


ALTER TABLE public.item_partners OWNER TO postgres;

--
-- Name: item_partner_energytexass; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexass (
)
INHERITS (public.item_partners);


ALTER TABLE public.item_partner_energytexass OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexass; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexass (
)
INHERITS (public.item_partner_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexass OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_cas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_cas (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_cas OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_cts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_cts (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_cts OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_gas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_gas (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_gas OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_ils; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_ils (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_ils OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_mas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_mas (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_mas OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_mds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_mds (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_mds OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_mis; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_mis (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_mis OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_nhs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_nhs (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_nhs OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_njs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_njs (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_njs OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_nys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_nys (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_nys OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_ohs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_ohs (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_ohs OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_pas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_pas (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_pas OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_ris; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_ris (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_ris OWNER TO postgres;

--
-- Name: item_partner_energytexas_brand_energytexas_txs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_partner_energytexas_brand_energytexas_txs (
)
INHERITS (public.item_partner_energytexas_brand_energytexass);


ALTER TABLE public.item_partner_energytexas_brand_energytexas_txs OWNER TO postgres;

--
-- Name: item_payaccounts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_payaccounts (
)
INHERITS (public.items);


ALTER TABLE public.item_payaccounts OWNER TO postgres;

--
-- Name: item_persons; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_persons (
    first_name character varying(50),
    last_name character varying(50),
    email character varying(50),
    phone_1 character varying(20),
    phone_2 character varying(20),
    lang character varying(20),
    ssn character varying(11),
    communication_method character varying(20),
    sms integer
)
INHERITS (public.items);


ALTER TABLE public.item_persons OWNER TO postgres;

--
-- Name: item_person_customers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_person_customers (
)
INHERITS (public.item_persons);


ALTER TABLE public.item_person_customers OWNER TO postgres;

--
-- Name: item_person_shopper_commercials; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_person_shopper_commercials (
    company_name character varying(100),
    monthly_bill character varying(20)
)
INHERITS (public.item_person_shoppers);


ALTER TABLE public.item_person_shopper_commercials OWNER TO postgres;

--
-- Name: item_person_shoppers_old; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_person_shoppers_old (
    lando_session character varying(50),
    ter_username character varying(50),
    ter_password character varying(50),
    credit_level integer,
    birthdate date,
    dl_state character varying(2),
    dl_number character varying(20),
    partner_person_id character varying(50),
    birthdate_day integer,
    birthdate_month integer,
    birthdate_year integer,
    timezone_offset integer,
    ip character varying(15),
    site_id integer,
    fax character varying(10),
    visitor_session_id bigint,
    customer_name character varying(100),
    allow_marketing character(1),
    cleaned character(1),
    ticket_cleaned character(1)
)
INHERITS (public.item_persons);


ALTER TABLE public.item_person_shoppers_old OWNER TO postgres;

--
-- Name: item_rekeys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_rekeys (
    old_item_id bigint,
    new_item_id bigint
);


ALTER TABLE public.item_rekeys OWNER TO postgres;

--
-- Name: item_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_reviews (
)
INHERITS (public.items);


ALTER TABLE public.item_reviews OWNER TO postgres;

--
-- Name: item_review_calls; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_review_calls (
    agent_id bigint,
    company_id bigint,
    reviewing_agent_id bigint,
    tier_one_score integer,
    tier_two_score integer,
    tier_three_score integer,
    overall_score integer,
    pass_fail character varying(10),
    tpv_pass_fail character varying(10)
)
INHERITS (public.item_reviews);


ALTER TABLE public.item_review_calls OWNER TO postgres;

--
-- Name: item_review_companys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_review_companys (
)
INHERITS (public.item_reviews);


ALTER TABLE public.item_review_companys OWNER TO postgres;

--
-- Name: item_review_company_usas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_review_company_usas (
    title text,
    location text,
    body text,
    author character varying(255),
    url character varying(300),
    rating_criteria_id1 integer,
    rating_score1 numeric(2,1),
    rating_criteria_id2 integer,
    rating_score2 numeric(2,1),
    rating_criteria_id3 integer,
    rating_score3 numeric(2,1),
    rating_criteria_id4 integer,
    rating_score4 numeric(2,1),
    rating_criteria_id5 integer,
    rating_score5 numeric(2,1),
    ctime timestamp without time zone,
    rep_comment text,
    rep_comment_time bigint,
    rep_comment_user_id integer,
    rep_comment_author text,
    rep_id integer,
    site_id integer,
    visitor_ip character varying(20),
    useful integer,
    notuseful integer,
    username character varying(50),
    email text,
    state character(2),
    product character varying(20),
    rating_overall numeric(2,1),
    approve character(1) DEFAULT 'n'::bpchar NOT NULL,
    rating_plans numeric(2,1),
    rating_billing numeric(2,1),
    rating_order_experience numeric(2,1),
    rating_customer_service numeric(2,1),
    rating_recommend numeric(2,1),
    our_comment text,
    customer_comment text,
    customer_comment_time bigint,
    show_email character(1) DEFAULT 'n'::bpchar NOT NULL,
    duplicate character(1)
)
INHERITS (public.item_review_companys);


ALTER TABLE public.item_review_company_usas OWNER TO postgres;

--
-- Name: item_smss; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_smss (
    sms text,
    fingerprint character varying(255),
    template character varying(50),
    username character varying(50)
)
INHERITS (public.items);


ALTER TABLE public.item_smss OWNER TO postgres;

--
-- Name: item_sms_autoreplys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_autoreplys (
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_autoreplys OWNER TO postgres;

--
-- Name: item_sms_customs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_customs (
    custom_text text
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_customs OWNER TO postgres;

--
-- Name: item_sms_docusigns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_docusigns (
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_docusigns OWNER TO postgres;

--
-- Name: item_sms_hold_orders; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_hold_orders (
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_hold_orders OWNER TO postgres;

--
-- Name: item_sms_order_by_text_completes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_order_by_text_completes (
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_order_by_text_completes OWNER TO postgres;

--
-- Name: item_sms_order_by_text_sents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_order_by_text_sents (
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_order_by_text_sents OWNER TO postgres;

--
-- Name: item_sms_partial_carts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_partial_carts (
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_partial_carts OWNER TO postgres;

--
-- Name: item_sms_prepared_carts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_sms_prepared_carts (
)
INHERITS (public.item_smss);


ALTER TABLE public.item_sms_prepared_carts OWNER TO postgres;

--
-- Name: item_survey_answers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_survey_answers (
    name character varying(255),
    description text,
    selected character(1),
    title character varying(255)
)
INHERITS (public.items);


ALTER TABLE public.item_survey_answers OWNER TO postgres;

--
-- Name: item_survey_answer_multiples; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_survey_answer_multiples (
)
INHERITS (public.item_survey_answers);


ALTER TABLE public.item_survey_answer_multiples OWNER TO postgres;

--
-- Name: item_survey_answer_texts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_survey_answer_texts (
    value text
)
INHERITS (public.item_survey_answers);


ALTER TABLE public.item_survey_answer_texts OWNER TO postgres;

--
-- Name: item_survey_answer_plandetails; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_survey_answer_plandetails (
)
INHERITS (public.item_survey_answer_texts);


ALTER TABLE public.item_survey_answer_plandetails OWNER TO postgres;

--
-- Name: item_survey_answer_textareas; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_survey_answer_textareas (
)
INHERITS (public.item_survey_answer_texts);


ALTER TABLE public.item_survey_answer_textareas OWNER TO postgres;

--
-- Name: item_tpvs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_tpvs (
)
INHERITS (public.items);


ALTER TABLE public.item_tpvs OWNER TO postgres;

--
-- Name: item_tpv_prepareds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_tpv_prepareds (
)
INHERITS (public.item_tpvs);


ALTER TABLE public.item_tpv_prepareds OWNER TO postgres;

--
-- Name: item_tpv_trusteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_tpv_trusteds (
    confirmation_number character varying(50),
    json text
)
INHERITS (public.item_tpvs);


ALTER TABLE public.item_tpv_trusteds OWNER TO postgres;

--
-- Name: item_values; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.item_values (
    id bigint,
    item_id bigint,
    item_model character varying(255),
    "values" text
);


ALTER TABLE public.item_values OWNER TO postgres;

--
-- Name: junk; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.junk (
    order_id_seq integer
);


ALTER TABLE public.junk OWNER TO postgres;

--
-- Name: kpi_numbers; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kpi_numbers (
    id bigint NOT NULL,
    rep_id bigint,
    period bigint,
    row_type text,
    submit bigint,
    accept bigint,
    paid bigint,
    value bigint DEFAULT '0'::bigint NOT NULL,
    as_of date,
    state character varying(2) DEFAULT 'TX'::character varying NOT NULL
);


ALTER TABLE public.kpi_numbers OWNER TO phpuser;

--
-- Name: kpi_numbers_daily; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kpi_numbers_daily (
    id bigint NOT NULL,
    rep_id bigint,
    period bigint,
    row_type text,
    submit bigint,
    accept bigint,
    paid bigint,
    value bigint,
    as_of date,
    state character varying(2)
);


ALTER TABLE public.kpi_numbers_daily OWNER TO phpuser;

--
-- Name: kpi_numbers_daily_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kpi_numbers_daily_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kpi_numbers_daily_id_seq OWNER TO phpuser;

--
-- Name: kpi_numbers_daily_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kpi_numbers_daily_id_seq OWNED BY public.kpi_numbers_daily.id;


--
-- Name: kpi_numbers_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kpi_numbers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kpi_numbers_id_seq OWNER TO phpuser;

--
-- Name: kpi_numbers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kpi_numbers_id_seq OWNED BY public.kpi_numbers.id;


--
-- Name: kpi_values; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kpi_values (
    id bigint NOT NULL,
    name text,
    value numeric(12,2),
    effective_date date,
    state text,
    value_text text
);


ALTER TABLE public.kpi_values OWNER TO phpuser;

--
-- Name: kpi_values_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kpi_values_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kpi_values_id_seq OWNER TO phpuser;

--
-- Name: kpi_values_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kpi_values_id_seq OWNED BY public.kpi_values.id;


--
-- Name: kw_action_compare; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_action_compare (
    id bigint NOT NULL,
    action_compare text
);


ALTER TABLE public.kw_action_compare OWNER TO phpuser;

--
-- Name: kw_action_compare_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_action_compare_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_action_compare_id_seq OWNER TO phpuser;

--
-- Name: kw_action_compare_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_action_compare_id_seq OWNED BY public.kw_action_compare.id;


--
-- Name: kw_action_switch; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_action_switch (
    id bigint NOT NULL,
    action_switch text
);


ALTER TABLE public.kw_action_switch OWNER TO phpuser;

--
-- Name: kw_action_switch_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_action_switch_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_action_switch_id_seq OWNER TO phpuser;

--
-- Name: kw_action_switch_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_action_switch_id_seq OWNED BY public.kw_action_switch.id;


--
-- Name: kw_energy_name; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_energy_name (
    id bigint NOT NULL,
    energy_type text
);


ALTER TABLE public.kw_energy_name OWNER TO phpuser;

--
-- Name: kw_energy_name_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_energy_name_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_energy_name_id_seq OWNER TO phpuser;

--
-- Name: kw_energy_name_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_energy_name_id_seq OWNED BY public.kw_energy_name.id;


--
-- Name: kw_provider; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_provider (
    id bigint NOT NULL,
    key_word text
);


ALTER TABLE public.kw_provider OWNER TO phpuser;

--
-- Name: kw_provider_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_provider_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_provider_id_seq OWNER TO phpuser;

--
-- Name: kw_provider_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_provider_id_seq OWNED BY public.kw_provider.id;


--
-- Name: kw_rates_prices; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_rates_prices (
    id bigint NOT NULL,
    price text
);


ALTER TABLE public.kw_rates_prices OWNER TO phpuser;

--
-- Name: kw_rates_prices_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_rates_prices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_rates_prices_id_seq OWNER TO phpuser;

--
-- Name: kw_rates_prices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_rates_prices_id_seq OWNED BY public.kw_rates_prices.id;


--
-- Name: kw_reviews; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_reviews (
    id bigint NOT NULL,
    kw_reviews text
);


ALTER TABLE public.kw_reviews OWNER TO phpuser;

--
-- Name: kw_reviews_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_reviews_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_reviews_id_seq OWNER TO phpuser;

--
-- Name: kw_reviews_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_reviews_id_seq OWNED BY public.kw_reviews.id;


--
-- Name: kw_utility; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_utility (
    id bigint NOT NULL,
    utility text
);


ALTER TABLE public.kw_utility OWNER TO phpuser;

--
-- Name: kw_utility_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_utility_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_utility_id_seq OWNER TO phpuser;

--
-- Name: kw_utility_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_utility_id_seq OWNED BY public.kw_utility.id;


--
-- Name: kw_value; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.kw_value (
    id bigint NOT NULL,
    kw_value text
);


ALTER TABLE public.kw_value OWNER TO phpuser;

--
-- Name: kw_value_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.kw_value_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.kw_value_id_seq OWNER TO phpuser;

--
-- Name: kw_value_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.kw_value_id_seq OWNED BY public.kw_value.id;


--
-- Name: langs; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.langs (
    id bigint NOT NULL,
    app character varying(20),
    key character varying(50),
    en text,
    es text
);


ALTER TABLE public.langs OWNER TO phpuser;

--
-- Name: langs_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.langs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.langs_id_seq OWNER TO phpuser;

--
-- Name: langs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.langs_id_seq OWNED BY public.langs.id;


--
-- Name: more_info_clicks; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.more_info_clicks (
    id bigint NOT NULL,
    vid text,
    site_id bigint,
    rep_id bigint,
    plan_id bigint,
    market_id bigint,
    ctime timestamp with time zone
);


ALTER TABLE public.more_info_clicks OWNER TO phpuser;

--
-- Name: more_info_clicks_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.more_info_clicks_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.more_info_clicks_id_seq OWNER TO phpuser;

--
-- Name: more_info_clicks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.more_info_clicks_id_seq OWNED BY public.more_info_clicks.id;


--
-- Name: order_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.order_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.order_id_seq OWNER TO postgres;

--
-- Name: order_ids; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.order_ids (
    id integer DEFAULT nextval('public.order_id_seq'::regclass),
    ticket_id bigint
);


ALTER TABLE public.order_ids OWNER TO postgres;

--
-- Name: page_update_log; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.page_update_log (
    id bigint NOT NULL,
    page_id bigint,
    name text,
    url text,
    description bytea,
    created timestamp with time zone
);


ALTER TABLE public.page_update_log OWNER TO phpuser;

--
-- Name: page_update_log_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.page_update_log_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.page_update_log_id_seq OWNER TO phpuser;

--
-- Name: page_update_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.page_update_log_id_seq OWNED BY public.page_update_log.id;


--
-- Name: phone_calls; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.phone_calls (
    id bigint,
    campaign character varying(50),
    call_type character varying(50),
    agent character varying(50),
    agent_name character varying(50),
    disposition text,
    ani character varying(50),
    customer_name character varying(50),
    dnis character(10),
    call_time integer,
    bill_time integer,
    ivr_time integer,
    queue_time integer,
    ring_time integer,
    talk_time integer,
    hold_time integer,
    park_time integer,
    after_call_time integer,
    cost numeric(10,4),
    transfers smallint,
    conferences smallint,
    holds smallint,
    abandons smallint,
    recordings character varying(30),
    created timestamp without time zone,
    call_id character varying(50)
);


ALTER TABLE public.phone_calls OWNER TO postgres;

--
-- Name: plan_click_summary; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_click_summary (
    id bigint NOT NULL,
    site_id bigint,
    week_start date,
    week_end date,
    clicks bigint,
    flux_clicks bigint,
    resolved_clicks bigint,
    orders bigint,
    flux_orders bigint,
    resolved_orders bigint,
    pending bigint,
    flowing bigint,
    outbox bigint,
    cancelled bigint,
    complete character varying(1) DEFAULT 'N'::character varying NOT NULL,
    visitors bigint,
    spend bigint,
    created timestamp with time zone,
    modified timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.plan_click_summary OWNER TO phpuser;

--
-- Name: plan_click_summary_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_click_summary_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_click_summary_id_seq OWNER TO phpuser;

--
-- Name: plan_click_summary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_click_summary_id_seq OWNED BY public.plan_click_summary.id;


--
-- Name: plan_clicks; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_clicks (
    id bigint NOT NULL,
    market_id bigint,
    plan_id bigint,
    ctime timestamp with time zone,
    vid text,
    click_type text,
    page text,
    section text,
    section_filter text,
    item_index integer,
    guid text,
    site_id bigint,
    ticket_id numeric
);


ALTER TABLE public.plan_clicks OWNER TO phpuser;

--
-- Name: plan_clicks_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_clicks_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_clicks_id_seq OWNER TO phpuser;

--
-- Name: plan_clicks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_clicks_id_seq OWNED BY public.plan_clicks.id;


--
-- Name: plan_features; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_features (
    id bigint NOT NULL,
    name text,
    image text
);


ALTER TABLE public.plan_features OWNER TO phpuser;

--
-- Name: plan_features_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_features_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_features_id_seq OWNER TO phpuser;

--
-- Name: plan_features_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_features_id_seq OWNED BY public.plan_features.id;


--
-- Name: plan_group_log; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_group_log (
    id bigint NOT NULL,
    name text,
    plan_id bigint,
    sort_order bigint,
    started timestamp with time zone,
    ended timestamp with time zone
);


ALTER TABLE public.plan_group_log OWNER TO phpuser;

--
-- Name: plan_group_log_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_group_log_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_group_log_id_seq OWNER TO phpuser;

--
-- Name: plan_group_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_group_log_id_seq OWNED BY public.plan_group_log.id;


--
-- Name: plan_groups; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_groups (
    id bigint NOT NULL,
    name text,
    description bytea,
    plan_id bigint,
    sort_order bigint,
    created timestamp with time zone,
    modified timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.plan_groups OWNER TO phpuser;

--
-- Name: plan_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_groups_id_seq OWNER TO phpuser;

--
-- Name: plan_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_groups_id_seq OWNED BY public.plan_groups.id;


--
-- Name: plan_market_charges; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_market_charges (
    id bigint NOT NULL,
    rep_id bigint,
    plan_id bigint,
    market_id bigint,
    plan_market_id bigint,
    commodity character varying(1),
    charge_type text,
    charge_per character varying(1),
    charge_source character varying(1),
    start_units bigint,
    end_units bigint,
    charge_amt numeric(10,5),
    offset_units bigint DEFAULT '0'::bigint NOT NULL,
    cap_units bigint DEFAULT '0'::bigint NOT NULL,
    is_efl character varying(1),
    manual character varying(1) DEFAULT 'n'::character varying NOT NULL
);


ALTER TABLE public.plan_market_charges OWNER TO phpuser;

--
-- Name: plan_market_charges_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_market_charges_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_market_charges_id_seq OWNER TO phpuser;

--
-- Name: plan_market_charges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_market_charges_id_seq OWNED BY public.plan_market_charges.id;


--
-- Name: plan_market_schedules; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_market_schedules (
    id bigint NOT NULL,
    plan_market_id bigint,
    rep_id bigint,
    plan_id bigint,
    market_id bigint,
    effective timestamp with time zone,
    rate_elec_2000 numeric(6,4),
    rate_elec_1000 numeric(6,4),
    rate_elec_500 numeric(6,4),
    rate_gas numeric(6,4),
    efl_url text
);


ALTER TABLE public.plan_market_schedules OWNER TO phpuser;

--
-- Name: plan_market_schedules_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_market_schedules_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_market_schedules_id_seq OWNER TO phpuser;

--
-- Name: plan_market_schedules_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_market_schedules_id_seq OWNED BY public.plan_market_schedules.id;


--
-- Name: plan_markets; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_markets (
    id bigint NOT NULL,
    plan_id bigint NOT NULL,
    market_id integer,
    rate numeric(17,1),
    roll_off_rate numeric(17,1),
    efl_url text,
    login_page_url text,
    plan_page_url text,
    ctime timestamp with time zone,
    mtime timestamp with time zone,
    partner_product_id text,
    partner_plan_id text,
    partner_utility_name text,
    partner_raw_data bytea,
    tdu_customer_charge numeric(5,2),
    tdu_delivery_charge numeric(10,4),
    energy_charge numeric(10,4),
    rate_elec numeric(17,3),
    rate_gas numeric(17,3),
    rate_gas_therm numeric(17,3),
    rate_gas_ccf numeric(17,3),
    rate_gas_mcf numeric(17,3),
    partner_rate_id text,
    rate_elec_2000 numeric(10,5),
    rate_elec_1000 numeric(10,5),
    rate_elec_500 numeric(10,5),
    legal_script bytea,
    rate_summer numeric(5,3),
    rate_winter numeric(5,3),
    rate_promo numeric(5,3),
    rate_promo_months bigint,
    rate_after_promo numeric(5,3),
    rate_daily numeric(5,3),
    updated character varying(1) DEFAULT ''::character varying NOT NULL,
    calc_rate_elec_500 numeric(10,5),
    calc_rate_elec_1000 numeric(10,5),
    calc_rate_elec_2000 numeric(10,5),
    calc_rate_gas numeric(10,5),
    avg_rate_elec_500 numeric(10,5),
    avg_rate_elec_1000 numeric(10,5),
    avg_rate_elec_2000 numeric(10,5),
    avg_rate_gas numeric(10,5)
);


ALTER TABLE public.plan_markets OWNER TO phpuser;

--
-- Name: plan_markets_historical; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_markets_historical (
    id bigint NOT NULL,
    plan_id bigint NOT NULL,
    market_id integer NOT NULL,
    rate_gas numeric(17,3),
    rate_elec_2000 numeric(10,5),
    rate_elec_1000 numeric(10,5),
    rate_elec_500 numeric(10,5),
    old_rate_gas numeric(17,3),
    old_rate_elec_2000 numeric(10,5),
    old_rate_elec_1000 numeric(10,5),
    old_rate_elec_500 numeric(10,5),
    start_date date,
    end_date date,
    rate_change_notified character varying(1) DEFAULT 'n'::character varying NOT NULL
);


ALTER TABLE public.plan_markets_historical OWNER TO phpuser;

--
-- Name: plan_markets_historical_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_markets_historical_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_markets_historical_id_seq OWNER TO phpuser;

--
-- Name: plan_markets_historical_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_markets_historical_id_seq OWNED BY public.plan_markets_historical.id;


--
-- Name: plan_markets_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_markets_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_markets_id_seq OWNER TO phpuser;

--
-- Name: plan_markets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_markets_id_seq OWNED BY public.plan_markets.id;


--
-- Name: plan_markets_snapshot; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_markets_snapshot (
    id bigint DEFAULT '0'::bigint NOT NULL,
    plan_id bigint NOT NULL,
    market_id integer,
    rate numeric(17,1),
    roll_off_rate numeric(17,1),
    efl_url text,
    login_page_url text,
    plan_page_url text,
    ctime timestamp with time zone,
    mtime timestamp with time zone,
    partner_product_id text,
    partner_plan_id text,
    partner_utility_name text,
    partner_raw_data bytea,
    tdu_customer_charge numeric(5,2),
    tdu_delivery_charge numeric(10,4),
    energy_charge numeric(10,4),
    rate_elec numeric(17,3),
    rate_gas numeric(17,3),
    rate_gas_therm numeric(17,3),
    rate_gas_ccf numeric(17,3),
    rate_gas_mcf numeric(17,3),
    partner_rate_id text,
    rate_elec_2000 numeric(10,5),
    rate_elec_1000 numeric(10,5),
    rate_elec_500 numeric(10,5),
    legal_script bytea,
    rate_summer numeric(5,3),
    rate_winter numeric(5,3),
    rate_promo numeric(5,3),
    rate_promo_months bigint,
    rate_after_promo numeric(5,3),
    rate_daily numeric(5,3),
    updated character varying(1) DEFAULT ''::character varying NOT NULL,
    calc_rate_elec_500 numeric(10,5),
    calc_rate_elec_1000 numeric(10,5),
    calc_rate_elec_2000 numeric(10,5),
    calc_rate_gas numeric(10,5),
    avg_rate_elec_500 numeric(10,5),
    avg_rate_elec_1000 numeric(10,5),
    avg_rate_elec_2000 numeric(10,5),
    avg_rate_gas numeric(10,5)
);


ALTER TABLE public.plan_markets_snapshot OWNER TO phpuser;

--
-- Name: plan_markets_tx; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_markets_tx (
    id bigint NOT NULL,
    rep_id bigint,
    plan_id bigint,
    market_id bigint,
    plan_market_id bigint,
    rate_elec_50 numeric(10,5),
    rate_elec_100 numeric(10,5),
    rate_elec_150 numeric(10,5),
    rate_elec_200 numeric(10,5),
    rate_elec_250 numeric(10,5),
    rate_elec_300 numeric(10,5),
    rate_elec_350 numeric(10,5),
    rate_elec_400 numeric(10,5),
    rate_elec_450 numeric(10,5),
    rate_elec_500 numeric(10,5),
    rate_elec_550 numeric(10,5),
    rate_elec_600 numeric(10,5),
    rate_elec_650 numeric(10,5),
    rate_elec_700 numeric(10,5),
    rate_elec_750 numeric(10,5),
    rate_elec_800 numeric(10,5),
    rate_elec_850 numeric(10,5),
    rate_elec_900 numeric(10,5),
    rate_elec_950 numeric(10,5),
    rate_elec_1000 numeric(10,5),
    rate_elec_1050 numeric(10,5),
    rate_elec_1100 numeric(10,5),
    rate_elec_1150 numeric(10,5),
    rate_elec_1200 numeric(10,5),
    rate_elec_1250 numeric(10,5),
    rate_elec_1300 numeric(10,5),
    rate_elec_1350 numeric(10,5),
    rate_elec_1400 numeric(10,5),
    rate_elec_1450 numeric(10,5),
    rate_elec_1500 numeric(10,5),
    rate_elec_1550 numeric(10,5),
    rate_elec_1600 numeric(10,5),
    rate_elec_1650 numeric(10,5),
    rate_elec_1700 numeric(10,5),
    rate_elec_1750 numeric(10,5),
    rate_elec_1800 numeric(10,5),
    rate_elec_1850 numeric(10,5),
    rate_elec_1900 numeric(10,5),
    rate_elec_1950 numeric(10,5),
    rate_elec_2000 numeric(10,5),
    rate_elec_2050 numeric(10,5),
    rate_elec_2100 numeric(10,5),
    rate_elec_2150 numeric(10,5),
    rate_elec_2200 numeric(10,5),
    rate_elec_2250 numeric(10,5),
    rate_elec_2300 numeric(10,5),
    rate_elec_2350 numeric(10,5),
    rate_elec_2400 numeric(10,5),
    rate_elec_2450 numeric(10,5),
    rate_elec_2500 numeric(10,5),
    rate_elec_2550 numeric(10,5),
    rate_elec_2600 numeric(10,5),
    rate_elec_2650 numeric(10,5),
    rate_elec_2700 numeric(10,5),
    rate_elec_2750 numeric(10,5),
    rate_elec_2800 numeric(10,5),
    rate_elec_2850 numeric(10,5),
    rate_elec_2900 numeric(10,5),
    rate_elec_2950 numeric(10,5),
    rate_elec_3000 numeric(10,5),
    created timestamp with time zone,
    modified timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.plan_markets_tx OWNER TO phpuser;

--
-- Name: plan_markets_tx_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_markets_tx_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_markets_tx_id_seq OWNER TO phpuser;

--
-- Name: plan_markets_tx_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_markets_tx_id_seq OWNED BY public.plan_markets_tx.id;


--
-- Name: plan_views; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plan_views (
    id bigint NOT NULL,
    visitor_id bigint,
    plan_id bigint,
    uri text,
    ctime timestamp with time zone,
    vid text,
    site_id bigint
);


ALTER TABLE public.plan_views OWNER TO phpuser;

--
-- Name: plan_views_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plan_views_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plan_views_id_seq OWNER TO phpuser;

--
-- Name: plan_views_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plan_views_id_seq OWNED BY public.plan_views.id;


--
-- Name: plans; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plans (
    id bigint NOT NULL,
    rep_id bigint NOT NULL,
    name text,
    ptc_name text,
    ptc_energy_type text,
    term numeric(4,0),
    energy_type text,
    renewable character varying(1) DEFAULT 'N'::character varying NOT NULL,
    prepaid character varying(1) DEFAULT 'N'::character varying NOT NULL,
    cancellation_fee text,
    ave_cost text,
    description text,
    html_title text,
    meta_desc text,
    meta_key text,
    page_title text,
    address_box_title text,
    pricegrid_tag_line text,
    login_page_url text,
    sort_order bigint,
    slug text,
    plan_page_url text,
    css_class text,
    recommended character varying(1) DEFAULT 'N'::character varying NOT NULL,
    lock character varying(1) DEFAULT 'N'::character varying NOT NULL,
    status character varying(1),
    ctime timestamp with time zone,
    mtime timestamp with time zone,
    old_plan_id bigint,
    monthly_recurring_charge character varying(20),
    terms_and_conditions_url text,
    partner_plan_key text,
    promo_img text,
    promo_tip text,
    special_terms text,
    minutia text,
    plan_pricing_code text,
    commodity character varying(1),
    state character varying(2),
    clicks_per_kviews numeric(4,1),
    view_value numeric(5,2),
    floater_description text,
    deposits character varying(1) DEFAULT 'H'::character varying NOT NULL,
    house_size character varying(1) DEFAULT 'L'::character varying NOT NULL,
    legal_script text,
    value_rewards numeric(6,2),
    value_promos numeric(6,2),
    friend_usp bigint,
    friend_simple bigint,
    friend_bighouse bigint,
    friend_mediumhouse bigint,
    friend_smallhouse bigint,
    friend_rewards bigint,
    friend_promos bigint,
    friend_deposits bigint,
    updated character varying(1) DEFAULT 'n'::character varying NOT NULL,
    partner_description text,
    promo_smarthome character varying(1),
    promo_freepower character varying(1),
    promo_rewards character varying(1),
    promo_greenpct bigint,
    from_scrape character varying(1) DEFAULT 'n'::character varying NOT NULL,
    daily_recurring_charge numeric(5,2),
    our_opinion text,
    customer_type character varying(1) DEFAULT 'r'::character varying NOT NULL,
    min_balance bigint,
    exclusive character varying(1) DEFAULT 'N'::character varying NOT NULL,
    mills bigint,
    site_id bigint DEFAULT '0'::bigint NOT NULL,
    upfront_adder numeric(10,2)
);


ALTER TABLE public.plans OWNER TO phpuser;

--
-- Name: plans_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plans_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plans_id_seq OWNER TO phpuser;

--
-- Name: plans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plans_id_seq OWNED BY public.plans.id;


--
-- Name: plans_snapshot; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plans_snapshot (
    id bigint DEFAULT '0'::bigint NOT NULL,
    rep_id bigint NOT NULL,
    name text,
    ptc_name text,
    ptc_energy_type text,
    term numeric(4,0),
    energy_type text,
    renewable character varying(1) DEFAULT 'N'::character varying NOT NULL,
    prepaid character varying(1) DEFAULT 'N'::character varying NOT NULL,
    cancellation_fee text,
    ave_cost text,
    description text,
    html_title text,
    meta_desc text,
    meta_key text,
    page_title text,
    address_box_title text,
    pricegrid_tag_line text,
    login_page_url text,
    sort_order bigint,
    slug text,
    plan_page_url text,
    css_class text,
    recommended character varying(1) DEFAULT 'N'::character varying NOT NULL,
    lock character varying(1) DEFAULT 'N'::character varying NOT NULL,
    status character varying(1),
    ctime timestamp with time zone,
    mtime timestamp with time zone,
    old_plan_id bigint,
    monthly_recurring_charge numeric(5,2),
    terms_and_conditions_url text,
    partner_plan_key text,
    promo_img text,
    promo_tip text,
    special_terms text,
    minutia text,
    plan_pricing_code text,
    commodity character varying(1),
    state character varying(2),
    clicks_per_kviews numeric(4,1),
    view_value numeric(5,2),
    floater_description bytea,
    deposits character varying(1) DEFAULT 'H'::character varying NOT NULL,
    house_size character varying(1) DEFAULT 'L'::character varying NOT NULL,
    legal_script bytea,
    value_rewards numeric(6,2),
    value_promos numeric(6,2),
    friend_usp bigint,
    friend_simple bigint,
    friend_bighouse bigint,
    friend_mediumhouse bigint,
    friend_smallhouse bigint,
    friend_rewards bigint,
    friend_promos bigint,
    friend_deposits bigint,
    updated character varying(1) DEFAULT 'n'::character varying NOT NULL,
    partner_description text,
    promo_smarthome character varying(1),
    promo_freepower character varying(1),
    promo_rewards character varying(1),
    promo_greenpct bigint,
    from_scrape character varying(1) DEFAULT 'n'::character varying NOT NULL,
    daily_recurring_charge numeric(5,2),
    our_opinion bytea,
    customer_type character varying(1) DEFAULT 'r'::character varying NOT NULL,
    min_balance bigint,
    exclusive character varying(1) DEFAULT 'N'::character varying NOT NULL,
    mills bigint,
    site_id bigint DEFAULT '0'::bigint NOT NULL,
    upfront_adder numeric(10,2)
);


ALTER TABLE public.plans_snapshot OWNER TO phpuser;

--
-- Name: plugin_users; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.plugin_users (
    id bigint NOT NULL,
    name text,
    email text,
    phone text,
    domain text,
    api_key text,
    hits numeric DEFAULT '0'::numeric NOT NULL,
    status character varying(1) DEFAULT 'n'::character varying NOT NULL,
    created timestamp with time zone,
    modified timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.plugin_users OWNER TO phpuser;

--
-- Name: plugin_users_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.plugin_users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.plugin_users_id_seq OWNER TO phpuser;

--
-- Name: plugin_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.plugin_users_id_seq OWNED BY public.plugin_users.id;


--
-- Name: price_to_compare; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.price_to_compare (
    id bigint NOT NULL,
    tdsp text,
    rate_start date,
    rate_end date,
    rate numeric(6,3)
);


ALTER TABLE public.price_to_compare OWNER TO phpuser;

--
-- Name: price_to_compare_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.price_to_compare_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.price_to_compare_id_seq OWNER TO phpuser;

--
-- Name: price_to_compare_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.price_to_compare_id_seq OWNED BY public.price_to_compare.id;


--
-- Name: ptc_data; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.ptc_data (
    id bigint NOT NULL,
    tdsp text DEFAULT '0'::text NOT NULL,
    zip character varying(5) DEFAULT '0'::character varying NOT NULL,
    rep_company_name text,
    tdu_company_name text,
    rep_company text,
    product text,
    kwh500 numeric(17,1),
    kwh1000 numeric(17,1) NOT NULL,
    kwh2000 numeric(17,1),
    kwh500_per_month numeric(17,1),
    kwh1000_per_month numeric(17,1),
    kwh2000_per_month numeric(17,1),
    prepaid public.ptc_data_prepaid,
    prepaid_url text,
    fixed public.ptc_data_fixed,
    rate_type text,
    renewable smallint,
    term_type_key smallint,
    term_type_desc text,
    term_value smallint,
    term_type smallint,
    cancel_type_key smallint,
    cancel_type_desc text NOT NULL,
    cancel_type text,
    website text,
    special_terms text,
    terms_url text,
    facts_url text,
    promotion public.ptc_data_promotion,
    promotion_desc text,
    ctime timestamp with time zone
);


ALTER TABLE public.ptc_data OWNER TO phpuser;

--
-- Name: ptc_data_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.ptc_data_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ptc_data_id_seq OWNER TO phpuser;

--
-- Name: ptc_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.ptc_data_id_seq OWNED BY public.ptc_data.id;


--
-- Name: ptc_stats; Type: TABLE; Schema: public; Owner: phpuser
--

CREATE TABLE public.ptc_stats (
    id bigint NOT NULL,
    n_plans bigint,
    n_updated bigint,
    n_new bigint,
    n_new_reps bigint,
    ctime timestamp with time zone
);


ALTER TABLE public.ptc_stats OWNER TO phpuser;

--
-- Name: ptc_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: phpuser
--

CREATE SEQUENCE public.ptc_stats_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ptc_stats_id_seq OWNER TO phpuser;

--
-- Name: ptc_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: phpuser
--

ALTER SEQUENCE public.ptc_stats_id_seq OWNED BY public.ptc_stats.id;


--
-- Name: puc_reps; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.puc_reps (
    id bigint,
    state character(2),
    rep_scrape_id bigint
);


ALTER TABLE public.puc_reps OWNER TO postgres;

--
-- Name: queues; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queues (
    id bigint,
    ticket_id bigint,
    reason text
);


ALTER TABLE public.queues OWNER TO postgres;

--
-- Name: queue_agent_productions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_productions (
)
INHERITS (public.queues);


ALTER TABLE public.queue_agent_productions OWNER TO postgres;

--
-- Name: queue_agent_production_highs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_production_highs (
)
INHERITS (public.queue_agent_productions);


ALTER TABLE public.queue_agent_production_highs OWNER TO postgres;

--
-- Name: queue_agent_production_lows; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_production_lows (
)
INHERITS (public.queue_agent_productions);


ALTER TABLE public.queue_agent_production_lows OWNER TO postgres;

--
-- Name: queue_agent_production_meds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_production_meds (
)
INHERITS (public.queue_agent_productions);


ALTER TABLE public.queue_agent_production_meds OWNER TO postgres;

--
-- Name: queue_agents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agents (
)
INHERITS (public.queues);


ALTER TABLE public.queue_agents OWNER TO postgres;

--
-- Name: queue_agent_standings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_standings (
)
INHERITS (public.queue_agents);


ALTER TABLE public.queue_agent_standings OWNER TO postgres;

--
-- Name: queue_agent_standing_as; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_standing_as (
)
INHERITS (public.queue_agent_standings);


ALTER TABLE public.queue_agent_standing_as OWNER TO postgres;

--
-- Name: queue_agent_standing_bs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_standing_bs (
)
INHERITS (public.queue_agent_standings);


ALTER TABLE public.queue_agent_standing_bs OWNER TO postgres;

--
-- Name: queue_agent_standing_cs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_standing_cs (
)
INHERITS (public.queue_agent_standings);


ALTER TABLE public.queue_agent_standing_cs OWNER TO postgres;

--
-- Name: queue_agent_standing_ds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_standing_ds (
)
INHERITS (public.queue_agent_standings);


ALTER TABLE public.queue_agent_standing_ds OWNER TO postgres;

--
-- Name: queue_agent_standing_fs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_agent_standing_fs (
)
INHERITS (public.queue_agent_standings);


ALTER TABLE public.queue_agent_standing_fs OWNER TO postgres;

--
-- Name: queue_books; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_books (
    rep_id integer
)
INHERITS (public.queues);


ALTER TABLE public.queue_books OWNER TO postgres;

--
-- Name: queue_calls; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_calls (
    user_id bigint,
    phone character(10)
)
INHERITS (public.queues);


ALTER TABLE public.queue_calls OWNER TO postgres;

--
-- Name: queue_call_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_call_cancelleds (
)
INHERITS (public.queue_calls);


ALTER TABLE public.queue_call_cancelleds OWNER TO postgres;

--
-- Name: queue_call_fulfilleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_call_fulfilleds (
)
INHERITS (public.queue_calls);


ALTER TABLE public.queue_call_fulfilleds OWNER TO postgres;

--
-- Name: queue_call_saveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_call_saveds (
    zip character varying(5),
    market integer,
    commodity character(1)
)
INHERITS (public.queue_calls);


ALTER TABLE public.queue_call_saveds OWNER TO postgres;

--
-- Name: queue_call_starts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_call_starts (
)
INHERITS (public.queue_calls);


ALTER TABLE public.queue_call_starts OWNER TO postgres;

--
-- Name: queue_carts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_carts (
)
INHERITS (public.queues);


ALTER TABLE public.queue_carts OWNER TO postgres;

--
-- Name: queue_cart_abandons; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_abandons (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_abandons OWNER TO postgres;

--
-- Name: queue_cart_accepteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_accepteds (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_accepteds OWNER TO postgres;

--
-- Name: queue_cart_actives; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_actives (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_actives OWNER TO postgres;

--
-- Name: queue_cart_archives; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_archives (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_archives OWNER TO postgres;

--
-- Name: queue_cart_autopay_requireds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_autopay_requireds (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_autopay_requireds OWNER TO postgres;

--
-- Name: queue_cart_balancedues; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_balancedues (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_balancedues OWNER TO postgres;

--
-- Name: queue_cart_deads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_deads (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_deads OWNER TO postgres;

--
-- Name: queue_cart_deposits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_deposits (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_deposits OWNER TO postgres;

--
-- Name: queue_cart_dualfuels; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_dualfuels (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_dualfuels OWNER TO postgres;

--
-- Name: queue_cart_fraudpotentials; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fraudpotentials (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_fraudpotentials OWNER TO postgres;

--
-- Name: queue_cart_fulfilleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilleds (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_fulfilleds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_cancelleds (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_cancelleds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_churneds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_churneds (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_churneds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_deposits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_deposits (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_deposits OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_docusigns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_docusigns (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_docusigns OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_flowings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_flowings (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_flowings OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_holds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_holds (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_holds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_outboxs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_outboxs (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_outboxs OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_outbox_holds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_outbox_holds (
)
INHERITS (public.queue_cart_fulfilled_outboxs);


ALTER TABLE public.queue_cart_fulfilled_outbox_holds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_pendings (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_pendings OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_rejecteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_rejecteds (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_rejecteds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_rejected_autopays; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_rejected_autopays (
)
INHERITS (public.queue_cart_fulfilled_rejecteds);


ALTER TABLE public.queue_cart_fulfilled_rejected_autopays OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_rejected_errors; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_rejected_errors (
)
INHERITS (public.queue_cart_fulfilled_rejecteds);


ALTER TABLE public.queue_cart_fulfilled_rejected_errors OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_rejected_existings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_rejected_existings (
)
INHERITS (public.queue_cart_fulfilled_rejecteds);


ALTER TABLE public.queue_cart_fulfilled_rejected_existings OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_rejected_plans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_rejected_plans (
)
INHERITS (public.queue_cart_fulfilled_rejecteds);


ALTER TABLE public.queue_cart_fulfilled_rejected_plans OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_rejected_switchholds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_rejected_switchholds (
)
INHERITS (public.queue_cart_fulfilled_rejecteds);


ALTER TABLE public.queue_cart_fulfilled_rejected_switchholds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_rejected_uans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_rejected_uans (
)
INHERITS (public.queue_cart_fulfilled_rejecteds);


ALTER TABLE public.queue_cart_fulfilled_rejected_uans OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_tpv_completes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_tpv_completes (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_tpv_completes OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_tpv_faileds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_tpv_faileds (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_tpv_faileds OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_tpv_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_tpv_pendings (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_tpv_pendings OWNER TO postgres;

--
-- Name: queue_cart_fulfilled_tpv_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_fulfilled_tpv_reviews (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_cart_fulfilled_tpv_reviews OWNER TO postgres;

--
-- Name: queue_cart_nodeposits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_nodeposits (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_nodeposits OWNER TO postgres;

--
-- Name: queue_cart_prepared_clickeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_prepared_clickeds (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_prepared_clickeds OWNER TO postgres;

--
-- Name: queue_cart_prepareds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_prepareds (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_prepareds OWNER TO postgres;

--
-- Name: queue_cart_starts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_starts (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_starts OWNER TO postgres;

--
-- Name: queue_cart_status_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_status_reviews (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_status_reviews OWNER TO postgres;

--
-- Name: queue_cart_submits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_submits (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_submits OWNER TO postgres;

--
-- Name: queue_cart_switchholds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_switchholds (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_switchholds OWNER TO postgres;

--
-- Name: queue_cart_systemdowns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_systemdowns (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_systemdowns OWNER TO postgres;

--
-- Name: queue_cart_texts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_texts (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_texts OWNER TO postgres;

--
-- Name: queue_cart_text_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_text_cancelleds (
)
INHERITS (public.queue_cart_texts);


ALTER TABLE public.queue_cart_text_cancelleds OWNER TO postgres;

--
-- Name: queue_cart_text_completeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_text_completeds (
)
INHERITS (public.queue_cart_texts);


ALTER TABLE public.queue_cart_text_completeds OWNER TO postgres;

--
-- Name: queue_cart_text_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_text_pendings (
)
INHERITS (public.queue_cart_texts);


ALTER TABLE public.queue_cart_text_pendings OWNER TO postgres;

--
-- Name: queue_cart_text_respondeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_text_respondeds (
)
INHERITS (public.queue_cart_texts);


ALTER TABLE public.queue_cart_text_respondeds OWNER TO postgres;

--
-- Name: queue_cart_writeoffs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cart_writeoffs (
)
INHERITS (public.queue_carts);


ALTER TABLE public.queue_cart_writeoffs OWNER TO postgres;

--
-- Name: queue_costs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_costs (
)
INHERITS (public.queues);


ALTER TABLE public.queue_costs OWNER TO postgres;

--
-- Name: queue_cost_bankeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cost_bankeds (
)
INHERITS (public.queue_costs);


ALTER TABLE public.queue_cost_bankeds OWNER TO postgres;

--
-- Name: queue_cost_casheds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cost_casheds (
)
INHERITS (public.queue_costs);


ALTER TABLE public.queue_cost_casheds OWNER TO postgres;

--
-- Name: queue_cost_helds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cost_helds (
)
INHERITS (public.queue_costs);


ALTER TABLE public.queue_cost_helds OWNER TO postgres;

--
-- Name: queue_cost_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cost_pendings (
)
INHERITS (public.queue_costs);


ALTER TABLE public.queue_cost_pendings OWNER TO postgres;

--
-- Name: queue_cost_removeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cost_removeds (
)
INHERITS (public.queue_costs);


ALTER TABLE public.queue_cost_removeds OWNER TO postgres;

--
-- Name: queue_cost_sents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_cost_sents (
)
INHERITS (public.queue_costs);


ALTER TABLE public.queue_cost_sents OWNER TO postgres;

--
-- Name: queue_counts_daily; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_counts_daily (
    table_name character varying(255),
    as_of date,
    net integer,
    ins integer,
    outs integer
);


ALTER TABLE public.queue_counts_daily OWNER TO postgres;

--
-- Name: queue_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_leads (
)
INHERITS (public.queues);


ALTER TABLE public.queue_leads OWNER TO postgres;

--
-- Name: queue_lead_abandoneds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_abandoneds (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_abandoneds OWNER TO postgres;

--
-- Name: queue_lead_accepteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_accepteds (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_accepteds OWNER TO postgres;

--
-- Name: queue_lead_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_cancelleds (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_cancelleds OWNER TO postgres;

--
-- Name: queue_lead_completes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_completes (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_completes OWNER TO postgres;

--
-- Name: queue_lead_contract_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_contract_pendings (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_contract_pendings OWNER TO postgres;

--
-- Name: queue_lead_quote_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_quote_pendings (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_quote_pendings OWNER TO postgres;

--
-- Name: queue_lead_quote_requireds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_quote_requireds (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_quote_requireds OWNER TO postgres;

--
-- Name: queue_lead_rate_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_rate_pendings (
)
INHERITS (public.queue_cart_fulfilleds);


ALTER TABLE public.queue_lead_rate_pendings OWNER TO postgres;

--
-- Name: queue_lead_rate_receiveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_rate_receiveds (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_rate_receiveds OWNER TO postgres;

--
-- Name: queue_lead_rejecteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_lead_rejecteds (
)
INHERITS (public.queue_leads);


ALTER TABLE public.queue_lead_rejecteds OWNER TO postgres;

--
-- Name: queue_ledgers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ledgers (
)
INHERITS (public.queues);


ALTER TABLE public.queue_ledgers OWNER TO postgres;

--
-- Name: queue_ledger_archives; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ledger_archives (
)
INHERITS (public.queue_ledgers);


ALTER TABLE public.queue_ledger_archives OWNER TO postgres;

--
-- Name: queue_ledger_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ledger_pendings (
)
INHERITS (public.queue_ledgers);


ALTER TABLE public.queue_ledger_pendings OWNER TO postgres;

--
-- Name: queue_ledger_sents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ledger_sents (
)
INHERITS (public.queue_ledgers);


ALTER TABLE public.queue_ledger_sents OWNER TO postgres;

--
-- Name: queue_meetings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_meetings (
)
INHERITS (public.queues);


ALTER TABLE public.queue_meetings OWNER TO postgres;

--
-- Name: queue_meeting_archiveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_meeting_archiveds (
)
INHERITS (public.queue_meetings);


ALTER TABLE public.queue_meeting_archiveds OWNER TO postgres;

--
-- Name: queue_meeting_completeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_meeting_completeds (
)
INHERITS (public.queue_meetings);


ALTER TABLE public.queue_meeting_completeds OWNER TO postgres;

--
-- Name: queue_meeting_followups; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_meeting_followups (
)
INHERITS (public.queue_meetings);


ALTER TABLE public.queue_meeting_followups OWNER TO postgres;

--
-- Name: queue_meeting_initiates; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_meeting_initiates (
)
INHERITS (public.queue_meetings);


ALTER TABLE public.queue_meeting_initiates OWNER TO postgres;

--
-- Name: queue_meeting_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_meeting_pendings (
)
INHERITS (public.queue_meetings);


ALTER TABLE public.queue_meeting_pendings OWNER TO postgres;

--
-- Name: queue_myaccounts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_myaccounts (
)
INHERITS (public.queues);


ALTER TABLE public.queue_myaccounts OWNER TO postgres;

--
-- Name: queue_myaccount_hiddens; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_myaccount_hiddens (
)
INHERITS (public.queue_myaccounts);


ALTER TABLE public.queue_myaccount_hiddens OWNER TO postgres;

--
-- Name: queue_myaccount_rafs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_myaccount_rafs (
)
INHERITS (public.queue_myaccounts);


ALTER TABLE public.queue_myaccount_rafs OWNER TO postgres;

--
-- Name: queue_myaccount_raf_dues; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_myaccount_raf_dues (
)
INHERITS (public.queue_myaccount_rafs);


ALTER TABLE public.queue_myaccount_raf_dues OWNER TO postgres;

--
-- Name: queue_myaccount_raf_earneds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_myaccount_raf_earneds (
)
INHERITS (public.queue_myaccount_rafs);


ALTER TABLE public.queue_myaccount_raf_earneds OWNER TO postgres;

--
-- Name: queue_myaccount_raf_paids; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_myaccount_raf_paids (
)
INHERITS (public.queue_myaccount_rafs);


ALTER TABLE public.queue_myaccount_raf_paids OWNER TO postgres;

--
-- Name: queue_myaccount_raf_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_myaccount_raf_pendings (
)
INHERITS (public.queue_myaccount_rafs);


ALTER TABLE public.queue_myaccount_raf_pendings OWNER TO postgres;

--
-- Name: queue_ops; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops (
)
INHERITS (public.queues);


ALTER TABLE public.queue_ops OWNER TO postgres;

--
-- Name: queue_ops_contacts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops_contacts (
)
INHERITS (public.queue_ops);


ALTER TABLE public.queue_ops_contacts OWNER TO postgres;

--
-- Name: queue_ops_contact_faileds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops_contact_faileds (
)
INHERITS (public.queue_ops_contacts);


ALTER TABLE public.queue_ops_contact_faileds OWNER TO postgres;

--
-- Name: queue_ops_contact_inbounds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops_contact_inbounds (
)
INHERITS (public.queue_ops_contacts);


ALTER TABLE public.queue_ops_contact_inbounds OWNER TO postgres;

--
-- Name: queue_ops_contact_initiates; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops_contact_initiates (
)
INHERITS (public.queue_ops_contacts);


ALTER TABLE public.queue_ops_contact_initiates OWNER TO postgres;

--
-- Name: queue_ops_contact_reacheds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops_contact_reacheds (
)
INHERITS (public.queue_ops_contacts);


ALTER TABLE public.queue_ops_contact_reacheds OWNER TO postgres;

--
-- Name: queue_ops_contact_requireds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops_contact_requireds (
    reason text
)
INHERITS (public.queue_ops_contacts);


ALTER TABLE public.queue_ops_contact_requireds OWNER TO postgres;

--
-- Name: queue_ops_data_entrys; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_ops_data_entrys (
)
INHERITS (public.queue_ops);


ALTER TABLE public.queue_ops_data_entrys OWNER TO postgres;

--
-- Name: queue_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_reviews (
)
INHERITS (public.queues);


ALTER TABLE public.queue_reviews OWNER TO postgres;

--
-- Name: queue_review_approveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_approveds (
)
INHERITS (public.queue_reviews);


ALTER TABLE public.queue_review_approveds OWNER TO postgres;

--
-- Name: queue_review_calls; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_calls (
)
INHERITS (public.queue_reviews);


ALTER TABLE public.queue_review_calls OWNER TO postgres;

--
-- Name: queue_review_call_archives; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_call_archives (
)
INHERITS (public.queue_review_calls);


ALTER TABLE public.queue_review_call_archives OWNER TO postgres;

--
-- Name: queue_review_call_assigneds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_call_assigneds (
)
INHERITS (public.queue_review_calls);


ALTER TABLE public.queue_review_call_assigneds OWNER TO postgres;

--
-- Name: queue_review_call_completeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_call_completeds (
)
INHERITS (public.queue_review_calls);


ALTER TABLE public.queue_review_call_completeds OWNER TO postgres;

--
-- Name: queue_review_call_faileds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_call_faileds (
)
INHERITS (public.queue_review_calls);


ALTER TABLE public.queue_review_call_faileds OWNER TO postgres;

--
-- Name: queue_review_call_passeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_call_passeds (
)
INHERITS (public.queue_review_calls);


ALTER TABLE public.queue_review_call_passeds OWNER TO postgres;

--
-- Name: queue_review_call_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_call_pendings (
)
INHERITS (public.queue_review_calls);


ALTER TABLE public.queue_review_call_pendings OWNER TO postgres;

--
-- Name: queue_review_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_pendings (
)
INHERITS (public.queue_reviews);


ALTER TABLE public.queue_review_pendings OWNER TO postgres;

--
-- Name: queue_review_rejecteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_review_rejecteds (
)
INHERITS (public.queue_reviews);


ALTER TABLE public.queue_review_rejecteds OWNER TO postgres;

--
-- Name: queue_summary; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_summary (
    table_name character varying(255),
    records integer,
    updated character(1) DEFAULT 'n'::bpchar NOT NULL
);


ALTER TABLE public.queue_summary OWNER TO postgres;

--
-- Name: queue_uploads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_uploads (
)
INHERITS (public.queues);


ALTER TABLE public.queue_uploads OWNER TO postgres;

--
-- Name: queue_upload_orders; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_upload_orders (
)
INHERITS (public.queue_uploads);


ALTER TABLE public.queue_upload_orders OWNER TO postgres;

--
-- Name: queue_upload_order_sents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_upload_order_sents (
)
INHERITS (public.queue_upload_orders);


ALTER TABLE public.queue_upload_order_sents OWNER TO postgres;

--
-- Name: queue_upload_orders_sents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queue_upload_orders_sents (
)
INHERITS (public.queue_upload_orders);


ALTER TABLE public.queue_upload_orders_sents OWNER TO postgres;

--
-- Name: queuelog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog (
    id bigint,
    ticket_id bigint,
    reason text
);


ALTER TABLE public.queuelog OWNER TO postgres;

--
-- Name: queuelog_agent_productions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_productions (
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_agent_productions OWNER TO postgres;

--
-- Name: queuelog_agent_production_highs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_highs (
)
INHERITS (public.queuelog_agent_productions);


ALTER TABLE public.queuelog_agent_production_highs OWNER TO postgres;

--
-- Name: queuelog_agent_production_highs_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_highs_in (
)
INHERITS (public.queuelog_agent_production_highs);


ALTER TABLE public.queuelog_agent_production_highs_in OWNER TO postgres;

--
-- Name: queuelog_agent_production_highs_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_highs_out (
)
INHERITS (public.queuelog_agent_production_highs);


ALTER TABLE public.queuelog_agent_production_highs_out OWNER TO postgres;

--
-- Name: queuelog_agent_production_lows; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_lows (
)
INHERITS (public.queuelog_agent_productions);


ALTER TABLE public.queuelog_agent_production_lows OWNER TO postgres;

--
-- Name: queuelog_agent_production_lows_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_lows_in (
)
INHERITS (public.queuelog_agent_production_lows);


ALTER TABLE public.queuelog_agent_production_lows_in OWNER TO postgres;

--
-- Name: queuelog_agent_production_lows_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_lows_out (
)
INHERITS (public.queuelog_agent_production_lows);


ALTER TABLE public.queuelog_agent_production_lows_out OWNER TO postgres;

--
-- Name: queuelog_agent_production_meds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_meds (
)
INHERITS (public.queuelog_agent_productions);


ALTER TABLE public.queuelog_agent_production_meds OWNER TO postgres;

--
-- Name: queuelog_agent_production_meds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_meds_in (
)
INHERITS (public.queuelog_agent_production_meds);


ALTER TABLE public.queuelog_agent_production_meds_in OWNER TO postgres;

--
-- Name: queuelog_agent_production_meds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_production_meds_out (
)
INHERITS (public.queuelog_agent_production_meds);


ALTER TABLE public.queuelog_agent_production_meds_out OWNER TO postgres;

--
-- Name: queuelog_agent_productions_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_productions_in (
)
INHERITS (public.queuelog_agent_productions);


ALTER TABLE public.queuelog_agent_productions_in OWNER TO postgres;

--
-- Name: queuelog_agent_productions_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_productions_out (
)
INHERITS (public.queuelog_agent_productions);


ALTER TABLE public.queuelog_agent_productions_out OWNER TO postgres;

--
-- Name: queuelog_agents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agents (
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_agents OWNER TO postgres;

--
-- Name: queuelog_agent_standings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standings (
)
INHERITS (public.queuelog_agents);


ALTER TABLE public.queuelog_agent_standings OWNER TO postgres;

--
-- Name: queuelog_agent_standing_as; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_as (
)
INHERITS (public.queuelog_agent_standings);


ALTER TABLE public.queuelog_agent_standing_as OWNER TO postgres;

--
-- Name: queuelog_agent_standing_as_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_as_in (
)
INHERITS (public.queuelog_agent_standing_as);


ALTER TABLE public.queuelog_agent_standing_as_in OWNER TO postgres;

--
-- Name: queuelog_agent_standing_as_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_as_out (
)
INHERITS (public.queuelog_agent_standing_as);


ALTER TABLE public.queuelog_agent_standing_as_out OWNER TO postgres;

--
-- Name: queuelog_agent_standing_bs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_bs (
)
INHERITS (public.queuelog_agent_standings);


ALTER TABLE public.queuelog_agent_standing_bs OWNER TO postgres;

--
-- Name: queuelog_agent_standing_bs_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_bs_in (
)
INHERITS (public.queuelog_agent_standing_bs);


ALTER TABLE public.queuelog_agent_standing_bs_in OWNER TO postgres;

--
-- Name: queuelog_agent_standing_bs_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_bs_out (
)
INHERITS (public.queuelog_agent_standing_bs);


ALTER TABLE public.queuelog_agent_standing_bs_out OWNER TO postgres;

--
-- Name: queuelog_agent_standing_cs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_cs (
)
INHERITS (public.queuelog_agent_standings);


ALTER TABLE public.queuelog_agent_standing_cs OWNER TO postgres;

--
-- Name: queuelog_agent_standing_cs_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_cs_in (
)
INHERITS (public.queuelog_agent_standing_cs);


ALTER TABLE public.queuelog_agent_standing_cs_in OWNER TO postgres;

--
-- Name: queuelog_agent_standing_cs_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_cs_out (
)
INHERITS (public.queuelog_agent_standing_cs);


ALTER TABLE public.queuelog_agent_standing_cs_out OWNER TO postgres;

--
-- Name: queuelog_agent_standing_ds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_ds (
)
INHERITS (public.queuelog_agent_standings);


ALTER TABLE public.queuelog_agent_standing_ds OWNER TO postgres;

--
-- Name: queuelog_agent_standing_ds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_ds_in (
)
INHERITS (public.queuelog_agent_standing_ds);


ALTER TABLE public.queuelog_agent_standing_ds_in OWNER TO postgres;

--
-- Name: queuelog_agent_standing_ds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_ds_out (
)
INHERITS (public.queuelog_agent_standing_ds);


ALTER TABLE public.queuelog_agent_standing_ds_out OWNER TO postgres;

--
-- Name: queuelog_agent_standing_fs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_fs (
)
INHERITS (public.queuelog_agent_standings);


ALTER TABLE public.queuelog_agent_standing_fs OWNER TO postgres;

--
-- Name: queuelog_agent_standing_fs_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_fs_in (
)
INHERITS (public.queuelog_agent_standing_fs);


ALTER TABLE public.queuelog_agent_standing_fs_in OWNER TO postgres;

--
-- Name: queuelog_agent_standing_fs_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standing_fs_out (
)
INHERITS (public.queuelog_agent_standing_fs);


ALTER TABLE public.queuelog_agent_standing_fs_out OWNER TO postgres;

--
-- Name: queuelog_agent_standings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standings_in (
)
INHERITS (public.queuelog_agent_standings);


ALTER TABLE public.queuelog_agent_standings_in OWNER TO postgres;

--
-- Name: queuelog_agent_standings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agent_standings_out (
)
INHERITS (public.queuelog_agent_standings);


ALTER TABLE public.queuelog_agent_standings_out OWNER TO postgres;

--
-- Name: queuelog_agents_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agents_in (
)
INHERITS (public.queuelog_agents);


ALTER TABLE public.queuelog_agents_in OWNER TO postgres;

--
-- Name: queuelog_agents_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_agents_out (
)
INHERITS (public.queuelog_agents);


ALTER TABLE public.queuelog_agents_out OWNER TO postgres;

--
-- Name: queuelog_books; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_books (
    rep_id integer
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_books OWNER TO postgres;

--
-- Name: queuelog_books_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_books_in (
)
INHERITS (public.queuelog_books);


ALTER TABLE public.queuelog_books_in OWNER TO postgres;

--
-- Name: queuelog_books_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_books_out (
)
INHERITS (public.queuelog_books);


ALTER TABLE public.queuelog_books_out OWNER TO postgres;

--
-- Name: queuelog_calls; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_calls (
    user_id bigint,
    phone character(10)
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_calls OWNER TO postgres;

--
-- Name: queuelog_call_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_cancelleds (
)
INHERITS (public.queuelog_calls);


ALTER TABLE public.queuelog_call_cancelleds OWNER TO postgres;

--
-- Name: queuelog_call_cancelleds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_cancelleds_in (
)
INHERITS (public.queuelog_call_cancelleds);


ALTER TABLE public.queuelog_call_cancelleds_in OWNER TO postgres;

--
-- Name: queuelog_call_cancelleds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_cancelleds_out (
)
INHERITS (public.queuelog_call_cancelleds);


ALTER TABLE public.queuelog_call_cancelleds_out OWNER TO postgres;

--
-- Name: queuelog_call_fulfilleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_fulfilleds (
)
INHERITS (public.queuelog_calls);


ALTER TABLE public.queuelog_call_fulfilleds OWNER TO postgres;

--
-- Name: queuelog_call_fulfilleds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_fulfilleds_in (
)
INHERITS (public.queuelog_call_fulfilleds);


ALTER TABLE public.queuelog_call_fulfilleds_in OWNER TO postgres;

--
-- Name: queuelog_call_fulfilleds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_fulfilleds_out (
)
INHERITS (public.queuelog_call_fulfilleds);


ALTER TABLE public.queuelog_call_fulfilleds_out OWNER TO postgres;

--
-- Name: queuelog_call_saveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_saveds (
)
INHERITS (public.queuelog_calls);


ALTER TABLE public.queuelog_call_saveds OWNER TO postgres;

--
-- Name: queuelog_call_saveds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_saveds_in (
)
INHERITS (public.queuelog_call_saveds);


ALTER TABLE public.queuelog_call_saveds_in OWNER TO postgres;

--
-- Name: queuelog_call_saveds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_saveds_out (
)
INHERITS (public.queuelog_call_saveds);


ALTER TABLE public.queuelog_call_saveds_out OWNER TO postgres;

--
-- Name: queuelog_call_starts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_starts (
)
INHERITS (public.queuelog_calls);


ALTER TABLE public.queuelog_call_starts OWNER TO postgres;

--
-- Name: queuelog_call_starts_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_starts_in (
)
INHERITS (public.queuelog_call_starts);


ALTER TABLE public.queuelog_call_starts_in OWNER TO postgres;

--
-- Name: queuelog_call_starts_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_call_starts_out (
)
INHERITS (public.queuelog_call_starts);


ALTER TABLE public.queuelog_call_starts_out OWNER TO postgres;

--
-- Name: queuelog_calls_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_calls_in (
)
INHERITS (public.queuelog_calls);


ALTER TABLE public.queuelog_calls_in OWNER TO postgres;

--
-- Name: queuelog_calls_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_calls_out (
)
INHERITS (public.queuelog_calls);


ALTER TABLE public.queuelog_calls_out OWNER TO postgres;

--
-- Name: queuelog_cart; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart (
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_cart OWNER TO postgres;

--
-- Name: queuelog_cart_abanadons; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_abanadons (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_abanadons OWNER TO postgres;

--
-- Name: queuelog_cart_abandons_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_abandons_in (
)
INHERITS (public.queuelog_cart_abanadons);


ALTER TABLE public.queuelog_cart_abandons_in OWNER TO postgres;

--
-- Name: queuelog_cart_abandons_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_abandons_out (
)
INHERITS (public.queuelog_cart_abanadons);


ALTER TABLE public.queuelog_cart_abandons_out OWNER TO postgres;

--
-- Name: queuelog_cart_accepteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_accepteds (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_accepteds OWNER TO postgres;

--
-- Name: queuelog_cart_accepteds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_accepteds_in (
)
INHERITS (public.queuelog_cart_accepteds);


ALTER TABLE public.queuelog_cart_accepteds_in OWNER TO postgres;

--
-- Name: queuelog_cart_accepteds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_accepteds_out (
)
INHERITS (public.queuelog_cart_accepteds);


ALTER TABLE public.queuelog_cart_accepteds_out OWNER TO postgres;

--
-- Name: queuelog_cart_actives; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_actives (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_actives OWNER TO postgres;

--
-- Name: queuelog_cart_actives_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_actives_in (
)
INHERITS (public.queuelog_cart_actives);


ALTER TABLE public.queuelog_cart_actives_in OWNER TO postgres;

--
-- Name: queuelog_cart_actives_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_actives_out (
)
INHERITS (public.queuelog_cart_actives);


ALTER TABLE public.queuelog_cart_actives_out OWNER TO postgres;

--
-- Name: queuelog_cart_archives; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_archives (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_archives OWNER TO postgres;

--
-- Name: queuelog_cart_archives_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_archives_in (
)
INHERITS (public.queuelog_cart_archives);


ALTER TABLE public.queuelog_cart_archives_in OWNER TO postgres;

--
-- Name: queuelog_cart_archives_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_archives_out (
)
INHERITS (public.queuelog_cart_archives);


ALTER TABLE public.queuelog_cart_archives_out OWNER TO postgres;

--
-- Name: queuelog_cart_autopay_requireds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_autopay_requireds (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_autopay_requireds OWNER TO postgres;

--
-- Name: queuelog_cart_autopay_requireds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_autopay_requireds_in (
)
INHERITS (public.queuelog_cart_autopay_requireds);


ALTER TABLE public.queuelog_cart_autopay_requireds_in OWNER TO postgres;

--
-- Name: queuelog_cart_autopay_requireds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_autopay_requireds_out (
)
INHERITS (public.queuelog_cart_autopay_requireds);


ALTER TABLE public.queuelog_cart_autopay_requireds_out OWNER TO postgres;

--
-- Name: queuelog_cart_balancedues; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_balancedues (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_balancedues OWNER TO postgres;

--
-- Name: queuelog_cart_balancedues_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_balancedues_in (
)
INHERITS (public.queuelog_cart_balancedues);


ALTER TABLE public.queuelog_cart_balancedues_in OWNER TO postgres;

--
-- Name: queuelog_cart_balancedues_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_balancedues_out (
)
INHERITS (public.queuelog_cart_balancedues);


ALTER TABLE public.queuelog_cart_balancedues_out OWNER TO postgres;

--
-- Name: queuelog_cart_deads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_deads (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_deads OWNER TO postgres;

--
-- Name: queuelog_cart_deads_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_deads_in (
)
INHERITS (public.queuelog_cart_deads);


ALTER TABLE public.queuelog_cart_deads_in OWNER TO postgres;

--
-- Name: queuelog_cart_deads_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_deads_out (
)
INHERITS (public.queuelog_cart_deads);


ALTER TABLE public.queuelog_cart_deads_out OWNER TO postgres;

--
-- Name: queuelog_cart_deposits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_deposits (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_deposits OWNER TO postgres;

--
-- Name: queuelog_cart_deposits_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_deposits_in (
)
INHERITS (public.queuelog_cart_deposits);


ALTER TABLE public.queuelog_cart_deposits_in OWNER TO postgres;

--
-- Name: queuelog_cart_deposits_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_deposits_out (
)
INHERITS (public.queuelog_cart_deposits);


ALTER TABLE public.queuelog_cart_deposits_out OWNER TO postgres;

--
-- Name: queuelog_cart_dualfuels; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_dualfuels (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_dualfuels OWNER TO postgres;

--
-- Name: queuelog_cart_dualfuels_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_dualfuels_in (
)
INHERITS (public.queuelog_cart_dualfuels);


ALTER TABLE public.queuelog_cart_dualfuels_in OWNER TO postgres;

--
-- Name: queuelog_cart_dualfuels_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_dualfuels_out (
)
INHERITS (public.queuelog_cart_dualfuels);


ALTER TABLE public.queuelog_cart_dualfuels_out OWNER TO postgres;

--
-- Name: queuelog_cart_fraudpotentials; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fraudpotentials (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_fraudpotentials OWNER TO postgres;

--
-- Name: queuelog_cart_fraudpotentials_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fraudpotentials_in (
)
INHERITS (public.queuelog_cart_fraudpotentials);


ALTER TABLE public.queuelog_cart_fraudpotentials_in OWNER TO postgres;

--
-- Name: queuelog_cart_fraudpotentials_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fraudpotentials_out (
)
INHERITS (public.queuelog_cart_fraudpotentials);


ALTER TABLE public.queuelog_cart_fraudpotentials_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilleds (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_fulfilleds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_cancelleds (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_cancelleds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_cancelleds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_cancelleds_in (
)
INHERITS (public.queuelog_cart_fulfilled_cancelleds);


ALTER TABLE public.queuelog_cart_fulfilled_cancelleds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_cancelleds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_cancelleds_out (
)
INHERITS (public.queuelog_cart_fulfilled_cancelleds);


ALTER TABLE public.queuelog_cart_fulfilled_cancelleds_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_churneds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_churneds (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_churneds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_churneds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_churneds_in (
)
INHERITS (public.queuelog_cart_fulfilled_churneds);


ALTER TABLE public.queuelog_cart_fulfilled_churneds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_churneds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_churneds_out (
)
INHERITS (public.queuelog_cart_fulfilled_churneds);


ALTER TABLE public.queuelog_cart_fulfilled_churneds_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_churns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_churns (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_churns OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_churns_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_churns_in (
)
INHERITS (public.queuelog_cart_fulfilled_churns);


ALTER TABLE public.queuelog_cart_fulfilled_churns_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_churns_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_churns_out (
)
INHERITS (public.queuelog_cart_fulfilled_churns);


ALTER TABLE public.queuelog_cart_fulfilled_churns_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_deposits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_deposits (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_deposits OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_deposits_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_deposits_in (
)
INHERITS (public.queuelog_cart_fulfilled_deposits);


ALTER TABLE public.queuelog_cart_fulfilled_deposits_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_deposits_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_deposits_out (
)
INHERITS (public.queuelog_cart_fulfilled_deposits);


ALTER TABLE public.queuelog_cart_fulfilled_deposits_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_docusigns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_docusigns (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_docusigns OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_docusigns_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_docusigns_in (
)
INHERITS (public.queuelog_cart_fulfilled_docusigns);


ALTER TABLE public.queuelog_cart_fulfilled_docusigns_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_docusigns_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_docusigns_out (
)
INHERITS (public.queuelog_cart_fulfilled_docusigns);


ALTER TABLE public.queuelog_cart_fulfilled_docusigns_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_flowings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_flowings (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_fulfilled_flowings OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_flowings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_flowings_in (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_flowings_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_flowings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_flowings_out (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_flowings_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_holds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_holds (
    id bigint,
    ticket_id bigint,
    reason text
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_holds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_holds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_holds_in (
)
INHERITS (public.queuelog_cart_fulfilled_holds);


ALTER TABLE public.queuelog_cart_fulfilled_holds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_holds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_holds_out (
)
INHERITS (public.queuelog_cart_fulfilled_holds);


ALTER TABLE public.queuelog_cart_fulfilled_holds_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_outboxs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_outboxs (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_outboxs OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_outbox_holds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_outbox_holds (
)
INHERITS (public.queuelog_cart_fulfilled_outboxs);


ALTER TABLE public.queuelog_cart_fulfilled_outbox_holds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_outbox_holds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_outbox_holds_in (
)
INHERITS (public.queuelog_cart_fulfilled_outbox_holds);


ALTER TABLE public.queuelog_cart_fulfilled_outbox_holds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_outbox_holds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_outbox_holds_out (
)
INHERITS (public.queuelog_cart_fulfilled_outbox_holds);


ALTER TABLE public.queuelog_cart_fulfilled_outbox_holds_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_outboxs_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_outboxs_in (
)
INHERITS (public.queuelog_cart_fulfilled_outboxs);


ALTER TABLE public.queuelog_cart_fulfilled_outboxs_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_outboxs_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_outboxs_out (
)
INHERITS (public.queuelog_cart_fulfilled_outboxs);


ALTER TABLE public.queuelog_cart_fulfilled_outboxs_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_pendings (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_pendings OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_pendings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_pendings_in (
)
INHERITS (public.queuelog_cart_fulfilled_pendings);


ALTER TABLE public.queuelog_cart_fulfilled_pendings_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_pendings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_pendings_out (
)
INHERITS (public.queuelog_cart_fulfilled_pendings);


ALTER TABLE public.queuelog_cart_fulfilled_pendings_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejecteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejecteds (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_rejecteds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_autopays; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_autopays (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_autopays OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_autopays_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_autopays_in (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_autopays);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_autopays_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_autopays_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_autopays_out (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_autopays);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_autopays_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_errors; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_errors (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_errors OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_errors_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_errors_in (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_errors);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_errors_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_errors_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_errors_out (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_errors);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_errors_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_existings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_existings (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_existings OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_existings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_existings_in (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_existings);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_existings_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_existings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_existings_out (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_existings);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_existings_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_plans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_plans (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_plans OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_plans_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_plans_in (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_plans);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_plans_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_plans_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_plans_out (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_plans);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_plans_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_switchholds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_switchholds (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_switchholds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_switchholds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_switchholds_in (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_switchholds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_switchholds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_switchholds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_switchholds_out (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_switchholds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_switchholds_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_uans; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_uans (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_uans OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_uans_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_uans_in (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_uans);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_uans_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejected_uans_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejected_uans_out (
)
INHERITS (public.queuelog_cart_fulfilled_rejected_uans);


ALTER TABLE public.queuelog_cart_fulfilled_rejected_uans_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejecteds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejecteds_in (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejecteds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_rejecteds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_rejecteds_out (
)
INHERITS (public.queuelog_cart_fulfilled_rejecteds);


ALTER TABLE public.queuelog_cart_fulfilled_rejecteds_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_completes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_completes (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_completes OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_completes_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_completes_in (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_completes);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_completes_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_completes_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_completes_out (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_completes);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_completes_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_faileds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_faileds (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_faileds OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_faileds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_faileds_in (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_faileds);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_faileds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_faileds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_faileds_out (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_faileds);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_faileds_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_pendings (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_pendings OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_pendings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_pendings_in (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_pendings);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_pendings_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_pendings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_pendings_out (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_pendings);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_pendings_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_reviews (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_reviews OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_reviews_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_reviews_in (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_reviews);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_reviews_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilled_tpv_reviews_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilled_tpv_reviews_out (
)
INHERITS (public.queuelog_cart_fulfilled_tpv_reviews);


ALTER TABLE public.queuelog_cart_fulfilled_tpv_reviews_out OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilleds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilleds_in (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilleds_in OWNER TO postgres;

--
-- Name: queuelog_cart_fulfilleds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_fulfilleds_out (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_cart_fulfilleds_out OWNER TO postgres;

--
-- Name: queuelog_cart_nodeposits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_nodeposits (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_nodeposits OWNER TO postgres;

--
-- Name: queuelog_cart_nodeposits_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_nodeposits_in (
)
INHERITS (public.queuelog_cart_nodeposits);


ALTER TABLE public.queuelog_cart_nodeposits_in OWNER TO postgres;

--
-- Name: queuelog_cart_nodeposits_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_nodeposits_out (
)
INHERITS (public.queuelog_cart_nodeposits);


ALTER TABLE public.queuelog_cart_nodeposits_out OWNER TO postgres;

--
-- Name: queuelog_cart_prepared_clickeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_prepared_clickeds (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_prepared_clickeds OWNER TO postgres;

--
-- Name: queuelog_cart_prepared_clickeds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_prepared_clickeds_in (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_prepared_clickeds_in OWNER TO postgres;

--
-- Name: queuelog_cart_prepared_clickeds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_prepared_clickeds_out (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_prepared_clickeds_out OWNER TO postgres;

--
-- Name: queuelog_cart_prepareds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_prepareds (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_prepareds OWNER TO postgres;

--
-- Name: queuelog_cart_prepareds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_prepareds_in (
)
INHERITS (public.queuelog_cart_prepareds);


ALTER TABLE public.queuelog_cart_prepareds_in OWNER TO postgres;

--
-- Name: queuelog_cart_prepareds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_prepareds_out (
)
INHERITS (public.queuelog_cart_prepareds);


ALTER TABLE public.queuelog_cart_prepareds_out OWNER TO postgres;

--
-- Name: queuelog_cart_starteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_starteds (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_starteds OWNER TO postgres;

--
-- Name: queuelog_cart_starteds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_starteds_in (
)
INHERITS (public.queuelog_cart_starteds);


ALTER TABLE public.queuelog_cart_starteds_in OWNER TO postgres;

--
-- Name: queuelog_cart_starteds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_starteds_out (
)
INHERITS (public.queuelog_cart_starteds);


ALTER TABLE public.queuelog_cart_starteds_out OWNER TO postgres;

--
-- Name: queuelog_cart_starts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_starts (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_starts OWNER TO postgres;

--
-- Name: queuelog_cart_starts_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_starts_in (
)
INHERITS (public.queuelog_cart_starts);


ALTER TABLE public.queuelog_cart_starts_in OWNER TO postgres;

--
-- Name: queuelog_cart_starts_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_starts_out (
)
INHERITS (public.queuelog_cart_starts);


ALTER TABLE public.queuelog_cart_starts_out OWNER TO postgres;

--
-- Name: queuelog_cart_status_reviews; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_status_reviews (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_status_reviews OWNER TO postgres;

--
-- Name: queuelog_cart_status_reviews_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_status_reviews_in (
)
INHERITS (public.queuelog_cart_status_reviews);


ALTER TABLE public.queuelog_cart_status_reviews_in OWNER TO postgres;

--
-- Name: queuelog_cart_status_reviews_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_status_reviews_out (
)
INHERITS (public.queuelog_cart_status_reviews);


ALTER TABLE public.queuelog_cart_status_reviews_out OWNER TO postgres;

--
-- Name: queuelog_cart_submits; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_submits (
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_cart_submits OWNER TO postgres;

--
-- Name: queuelog_cart_submits_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_submits_in (
)
INHERITS (public.queuelog_cart_submits);


ALTER TABLE public.queuelog_cart_submits_in OWNER TO postgres;

--
-- Name: queuelog_cart_submits_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_submits_out (
)
INHERITS (public.queuelog_cart_submits);


ALTER TABLE public.queuelog_cart_submits_out OWNER TO postgres;

--
-- Name: queuelog_cart_switchholds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_switchholds (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_switchholds OWNER TO postgres;

--
-- Name: queuelog_cart_switchholds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_switchholds_in (
)
INHERITS (public.queuelog_cart_switchholds);


ALTER TABLE public.queuelog_cart_switchholds_in OWNER TO postgres;

--
-- Name: queuelog_cart_switchholds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_switchholds_out (
)
INHERITS (public.queuelog_cart_switchholds);


ALTER TABLE public.queuelog_cart_switchholds_out OWNER TO postgres;

--
-- Name: queuelog_cart_systemdowns; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_systemdowns (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_systemdowns OWNER TO postgres;

--
-- Name: queuelog_cart_systemdowns_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_systemdowns_in (
)
INHERITS (public.queuelog_cart_systemdowns);


ALTER TABLE public.queuelog_cart_systemdowns_in OWNER TO postgres;

--
-- Name: queuelog_cart_systemdowns_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_systemdowns_out (
)
INHERITS (public.queuelog_cart_systemdowns);


ALTER TABLE public.queuelog_cart_systemdowns_out OWNER TO postgres;

--
-- Name: queuelog_cart_texts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_texts (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_texts OWNER TO postgres;

--
-- Name: queuelog_cart_text_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_cancelleds (
)
INHERITS (public.queuelog_cart_texts);


ALTER TABLE public.queuelog_cart_text_cancelleds OWNER TO postgres;

--
-- Name: queuelog_cart_text_cancelleds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_cancelleds_in (
)
INHERITS (public.queuelog_cart_text_cancelleds);


ALTER TABLE public.queuelog_cart_text_cancelleds_in OWNER TO postgres;

--
-- Name: queuelog_cart_text_cancelleds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_cancelleds_out (
)
INHERITS (public.queuelog_cart_text_cancelleds);


ALTER TABLE public.queuelog_cart_text_cancelleds_out OWNER TO postgres;

--
-- Name: queuelog_cart_text_completeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_completeds (
)
INHERITS (public.queuelog_cart_texts);


ALTER TABLE public.queuelog_cart_text_completeds OWNER TO postgres;

--
-- Name: queuelog_cart_text_completeds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_completeds_in (
)
INHERITS (public.queuelog_cart_text_completeds);


ALTER TABLE public.queuelog_cart_text_completeds_in OWNER TO postgres;

--
-- Name: queuelog_cart_text_completeds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_completeds_out (
)
INHERITS (public.queuelog_cart_text_completeds);


ALTER TABLE public.queuelog_cart_text_completeds_out OWNER TO postgres;

--
-- Name: queuelog_cart_text_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_pendings (
)
INHERITS (public.queuelog_cart_texts);


ALTER TABLE public.queuelog_cart_text_pendings OWNER TO postgres;

--
-- Name: queuelog_cart_text_pendings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_pendings_in (
)
INHERITS (public.queuelog_cart_text_pendings);


ALTER TABLE public.queuelog_cart_text_pendings_in OWNER TO postgres;

--
-- Name: queuelog_cart_text_pendings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_pendings_out (
)
INHERITS (public.queuelog_cart_text_pendings);


ALTER TABLE public.queuelog_cart_text_pendings_out OWNER TO postgres;

--
-- Name: queuelog_cart_text_respondeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_respondeds (
)
INHERITS (public.queuelog_cart_texts);


ALTER TABLE public.queuelog_cart_text_respondeds OWNER TO postgres;

--
-- Name: queuelog_cart_text_respondeds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_respondeds_in (
)
INHERITS (public.queuelog_cart_text_respondeds);


ALTER TABLE public.queuelog_cart_text_respondeds_in OWNER TO postgres;

--
-- Name: queuelog_cart_text_respondeds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_text_respondeds_out (
)
INHERITS (public.queuelog_cart_text_respondeds);


ALTER TABLE public.queuelog_cart_text_respondeds_out OWNER TO postgres;

--
-- Name: queuelog_cart_writeoffs; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_writeoffs (
)
INHERITS (public.queuelog_cart);


ALTER TABLE public.queuelog_cart_writeoffs OWNER TO postgres;

--
-- Name: queuelog_cart_writeoffs_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_writeoffs_in (
)
INHERITS (public.queuelog_cart_writeoffs);


ALTER TABLE public.queuelog_cart_writeoffs_in OWNER TO postgres;

--
-- Name: queuelog_cart_writeoffs_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cart_writeoffs_out (
)
INHERITS (public.queuelog_cart_writeoffs);


ALTER TABLE public.queuelog_cart_writeoffs_out OWNER TO postgres;

--
-- Name: queuelog_commissions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_commissions (
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_commissions OWNER TO postgres;

--
-- Name: queuelog_commission_ars; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_commission_ars (
)
INHERITS (public.queuelog_commissions);


ALTER TABLE public.queuelog_commission_ars OWNER TO postgres;

--
-- Name: queuelog_commission_ars_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_commission_ars_in (
)
INHERITS (public.queuelog_commission_ars);


ALTER TABLE public.queuelog_commission_ars_in OWNER TO postgres;

--
-- Name: queuelog_commission_ars_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_commission_ars_out (
)
INHERITS (public.queuelog_commission_ars);


ALTER TABLE public.queuelog_commission_ars_out OWNER TO postgres;

--
-- Name: queuelog_commission_paids; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_commission_paids (
)
INHERITS (public.queuelog_commissions);


ALTER TABLE public.queuelog_commission_paids OWNER TO postgres;

--
-- Name: queuelog_commission_paids_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_commission_paids_in (
)
INHERITS (public.queuelog_commission_paids);


ALTER TABLE public.queuelog_commission_paids_in OWNER TO postgres;

--
-- Name: queuelog_commission_paids_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_commission_paids_out (
)
INHERITS (public.queuelog_commission_paids);


ALTER TABLE public.queuelog_commission_paids_out OWNER TO postgres;

--
-- Name: queuelog_cost; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost (
    id bigint,
    ticket_id bigint,
    reason text
);


ALTER TABLE public.queuelog_cost OWNER TO postgres;

--
-- Name: queuelog_cost_bankeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_bankeds (
)
INHERITS (public.queuelog_cost);


ALTER TABLE public.queuelog_cost_bankeds OWNER TO postgres;

--
-- Name: queuelog_cost_bankeds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_bankeds_in (
)
INHERITS (public.queuelog_cost_bankeds);


ALTER TABLE public.queuelog_cost_bankeds_in OWNER TO postgres;

--
-- Name: queuelog_cost_bankeds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_bankeds_out (
)
INHERITS (public.queuelog_cost_bankeds);


ALTER TABLE public.queuelog_cost_bankeds_out OWNER TO postgres;

--
-- Name: queuelog_cost_casheds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_casheds (
)
INHERITS (public.queuelog_cost);


ALTER TABLE public.queuelog_cost_casheds OWNER TO postgres;

--
-- Name: queuelog_cost_casheds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_casheds_in (
)
INHERITS (public.queuelog_cost_casheds);


ALTER TABLE public.queuelog_cost_casheds_in OWNER TO postgres;

--
-- Name: queuelog_cost_casheds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_casheds_out (
)
INHERITS (public.queuelog_cost_casheds);


ALTER TABLE public.queuelog_cost_casheds_out OWNER TO postgres;

--
-- Name: queuelog_cost_helds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_helds (
)
INHERITS (public.queuelog_cost);


ALTER TABLE public.queuelog_cost_helds OWNER TO postgres;

--
-- Name: queuelog_cost_helds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_helds_in (
)
INHERITS (public.queuelog_cost_helds);


ALTER TABLE public.queuelog_cost_helds_in OWNER TO postgres;

--
-- Name: queuelog_cost_helds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_helds_out (
)
INHERITS (public.queuelog_cost_helds);


ALTER TABLE public.queuelog_cost_helds_out OWNER TO postgres;

--
-- Name: queuelog_cost_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_pendings (
)
INHERITS (public.queuelog_cost);


ALTER TABLE public.queuelog_cost_pendings OWNER TO postgres;

--
-- Name: queuelog_cost_pendings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_pendings_in (
)
INHERITS (public.queuelog_cost_pendings);


ALTER TABLE public.queuelog_cost_pendings_in OWNER TO postgres;

--
-- Name: queuelog_cost_pendings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_pendings_out (
)
INHERITS (public.queuelog_cost_pendings);


ALTER TABLE public.queuelog_cost_pendings_out OWNER TO postgres;

--
-- Name: queuelog_cost_removeds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_removeds (
)
INHERITS (public.queuelog_cost);


ALTER TABLE public.queuelog_cost_removeds OWNER TO postgres;

--
-- Name: queuelog_cost_removeds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_removeds_in (
)
INHERITS (public.queuelog_cost_removeds);


ALTER TABLE public.queuelog_cost_removeds_in OWNER TO postgres;

--
-- Name: queuelog_cost_removeds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_removeds_out (
)
INHERITS (public.queuelog_cost_removeds);


ALTER TABLE public.queuelog_cost_removeds_out OWNER TO postgres;

--
-- Name: queuelog_cost_sents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_sents (
)
INHERITS (public.queuelog_cost);


ALTER TABLE public.queuelog_cost_sents OWNER TO postgres;

--
-- Name: queuelog_cost_sents_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_sents_in (
)
INHERITS (public.queuelog_cost_sents);


ALTER TABLE public.queuelog_cost_sents_in OWNER TO postgres;

--
-- Name: queuelog_cost_sents_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_cost_sents_out (
)
INHERITS (public.queuelog_cost_sents);


ALTER TABLE public.queuelog_cost_sents_out OWNER TO postgres;

--
-- Name: queuelog_leads; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_leads (
)
INHERITS (public.queuelog);


ALTER TABLE public.queuelog_leads OWNER TO postgres;

--
-- Name: queuelog_lead_abandoneds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_abandoneds (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_abandoneds OWNER TO postgres;

--
-- Name: queuelog_lead_abandoneds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_abandoneds_in (
)
INHERITS (public.queuelog_lead_abandoneds);


ALTER TABLE public.queuelog_lead_abandoneds_in OWNER TO postgres;

--
-- Name: queuelog_lead_abandoneds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_abandoneds_out (
)
INHERITS (public.queuelog_lead_abandoneds);


ALTER TABLE public.queuelog_lead_abandoneds_out OWNER TO postgres;

--
-- Name: queuelog_lead_accepteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_accepteds (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_accepteds OWNER TO postgres;

--
-- Name: queuelog_lead_accepteds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_accepteds_in (
)
INHERITS (public.queuelog_lead_accepteds);


ALTER TABLE public.queuelog_lead_accepteds_in OWNER TO postgres;

--
-- Name: queuelog_lead_accepteds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_accepteds_out (
)
INHERITS (public.queuelog_lead_accepteds);


ALTER TABLE public.queuelog_lead_accepteds_out OWNER TO postgres;

--
-- Name: queuelog_lead_cancelleds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_cancelleds (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_cancelleds OWNER TO postgres;

--
-- Name: queuelog_lead_cancelleds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_cancelleds_in (
)
INHERITS (public.queuelog_lead_cancelleds);


ALTER TABLE public.queuelog_lead_cancelleds_in OWNER TO postgres;

--
-- Name: queuelog_lead_cancelleds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_cancelleds_out (
)
INHERITS (public.queuelog_lead_cancelleds);


ALTER TABLE public.queuelog_lead_cancelleds_out OWNER TO postgres;

--
-- Name: queuelog_lead_completes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_completes (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_completes OWNER TO postgres;

--
-- Name: queuelog_lead_completes_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_completes_in (
)
INHERITS (public.queuelog_lead_completes);


ALTER TABLE public.queuelog_lead_completes_in OWNER TO postgres;

--
-- Name: queuelog_lead_completes_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_completes_out (
)
INHERITS (public.queuelog_lead_completes);


ALTER TABLE public.queuelog_lead_completes_out OWNER TO postgres;

--
-- Name: queuelog_lead_contract_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_contract_pendings (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_contract_pendings OWNER TO postgres;

--
-- Name: queuelog_lead_contract_pendings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_contract_pendings_in (
)
INHERITS (public.queuelog_lead_contract_pendings);


ALTER TABLE public.queuelog_lead_contract_pendings_in OWNER TO postgres;

--
-- Name: queuelog_lead_contract_pendings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_contract_pendings_out (
)
INHERITS (public.queuelog_lead_contract_pendings);


ALTER TABLE public.queuelog_lead_contract_pendings_out OWNER TO postgres;

--
-- Name: queuelog_lead_quote_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_quote_pendings (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_quote_pendings OWNER TO postgres;

--
-- Name: queuelog_lead_quote_pendings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_quote_pendings_in (
)
INHERITS (public.queuelog_lead_quote_pendings);


ALTER TABLE public.queuelog_lead_quote_pendings_in OWNER TO postgres;

--
-- Name: queuelog_lead_quote_pendings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_quote_pendings_out (
)
INHERITS (public.queuelog_lead_quote_pendings);


ALTER TABLE public.queuelog_lead_quote_pendings_out OWNER TO postgres;

--
-- Name: queuelog_lead_quote_requireds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_quote_requireds (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_quote_requireds OWNER TO postgres;

--
-- Name: queuelog_lead_quote_requireds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_quote_requireds_in (
)
INHERITS (public.queuelog_lead_quote_requireds);


ALTER TABLE public.queuelog_lead_quote_requireds_in OWNER TO postgres;

--
-- Name: queuelog_lead_quote_requireds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_quote_requireds_out (
)
INHERITS (public.queuelog_lead_quote_requireds);


ALTER TABLE public.queuelog_lead_quote_requireds_out OWNER TO postgres;

--
-- Name: queuelog_lead_rate_pendings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_rate_pendings (
)
INHERITS (public.queuelog_cart_fulfilleds);


ALTER TABLE public.queuelog_lead_rate_pendings OWNER TO postgres;

--
-- Name: queuelog_lead_rate_pendings_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_rate_pendings_in (
)
INHERITS (public.queuelog_lead_rate_pendings);


ALTER TABLE public.queuelog_lead_rate_pendings_in OWNER TO postgres;

--
-- Name: queuelog_lead_rate_pendings_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_rate_pendings_out (
)
INHERITS (public.queuelog_lead_rate_pendings);


ALTER TABLE public.queuelog_lead_rate_pendings_out OWNER TO postgres;

--
-- Name: queuelog_lead_rate_receiveds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_rate_receiveds (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_rate_receiveds OWNER TO postgres;

--
-- Name: queuelog_lead_rate_receiveds_in; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_rate_receiveds_in (
)
INHERITS (public.queuelog_lead_rate_receiveds);


ALTER TABLE public.queuelog_lead_rate_receiveds_in OWNER TO postgres;

--
-- Name: queuelog_lead_rate_receiveds_out; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_rate_receiveds_out (
)
INHERITS (public.queuelog_lead_rate_receiveds);


ALTER TABLE public.queuelog_lead_rate_receiveds_out OWNER TO postgres;

--
-- Name: queuelog_lead_rejecteds; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.queuelog_lead_rejecteds (
)
INHERITS (public.queuelog_leads);


ALTER TABLE public.queuelog_lead_rejecteds OWNER TO postgres;

--
