-- Name: abp_london_boroughs; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.abp_london_boroughs (
    uprn bigint,
    borough_id integer,
    borough_gss_code character varying(9),
    borough character varying(22)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'abp_london_boroughs'
);
ALTER FOREIGN TABLE strategy.abp_london_boroughs ALTER COLUMN uprn OPTIONS (
    column_name 'uprn'
);
ALTER FOREIGN TABLE strategy.abp_london_boroughs ALTER COLUMN borough_id OPTIONS (
    column_name 'borough_id'
);
ALTER FOREIGN TABLE strategy.abp_london_boroughs ALTER COLUMN borough_gss_code OPTIONS (
    column_name 'borough_gss_code'
);
ALTER FOREIGN TABLE strategy.abp_london_boroughs ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);


ALTER FOREIGN TABLE strategy.abp_london_boroughs OWNER TO postgres;

--
-- Name: abp_london_wards; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.abp_london_wards (
    uprn bigint,
    ward_id integer,
    ward_code character varying(9),
    ward character varying(70)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'abp_london_wards'
);
ALTER FOREIGN TABLE strategy.abp_london_wards ALTER COLUMN uprn OPTIONS (
    column_name 'uprn'
);
ALTER FOREIGN TABLE strategy.abp_london_wards ALTER COLUMN ward_id OPTIONS (
    column_name 'ward_id'
);
ALTER FOREIGN TABLE strategy.abp_london_wards ALTER COLUMN ward_code OPTIONS (
    column_name 'ward_code'
);
ALTER FOREIGN TABLE strategy.abp_london_wards ALTER COLUMN ward OPTIONS (
    column_name 'ward'
);


ALTER FOREIGN TABLE strategy.abp_london_wards OWNER TO postgres;

--
-- Name: active_cabs; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.active_cabs (
    cab_name character varying(11),
    borough character varying(15),
    cab_type character varying(5),
    sdu_pm character varying(24),
    router character varying(2),
    hld character varying(8),
    ring character varying(12),
    jumper_detail character varying(19),
    cardsfitted_prebuild smallint,
    addcards_onsite smallint,
    zendesk_ticket character varying(9),
    cab_landing date,
    pia_uplink_ecd date,
    pia_spurs date,
    uplink_cable_blown_ecd date,
    uplink_spliced_ecd date,
    spurs_blown_ecd date,
    spurs_spliced_ecd date,
    handover_to_netops_ecd date,
    net_opps_ecd date,
    cross_connection_ecd date,
    etd date,
    build_required_by date,
    priority smallint,
    risk_level character varying(4),
    complete character varying(24),
    redund_yes_ecd character varying(15),
    comments character varying(160),
    total_fibrecount character varying(4),
    spur_schematic_link character varying(83)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'active_cabs'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN cab_type OPTIONS (
    column_name 'cab_type'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN sdu_pm OPTIONS (
    column_name 'sdu_pm'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN router OPTIONS (
    column_name 'router'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN hld OPTIONS (
    column_name 'hld'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN ring OPTIONS (
    column_name 'ring'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN jumper_detail OPTIONS (
    column_name 'jumper_detail'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN cardsfitted_prebuild OPTIONS (
    column_name 'cardsfitted_prebuild'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN addcards_onsite OPTIONS (
    column_name 'addcards_onsite'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN zendesk_ticket OPTIONS (
    column_name 'zendesk_ticket'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN cab_landing OPTIONS (
    column_name 'cab_landing'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN pia_uplink_ecd OPTIONS (
    column_name 'pia_uplink_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN pia_spurs OPTIONS (
    column_name 'pia_spurs'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN uplink_cable_blown_ecd OPTIONS (
    column_name 'uplink_cable_blown_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN uplink_spliced_ecd OPTIONS (
    column_name 'uplink_spliced_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN spurs_blown_ecd OPTIONS (
    column_name 'spurs_blown_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN spurs_spliced_ecd OPTIONS (
    column_name 'spurs_spliced_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN handover_to_netops_ecd OPTIONS (
    column_name 'handover_to_netops_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN net_opps_ecd OPTIONS (
    column_name 'net_opps_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN cross_connection_ecd OPTIONS (
    column_name 'cross_connection_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN etd OPTIONS (
    column_name 'etd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN build_required_by OPTIONS (
    column_name 'build_required_by'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN priority OPTIONS (
    column_name 'priority'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN risk_level OPTIONS (
    column_name 'risk_level'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN complete OPTIONS (
    column_name 'complete'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN redund_yes_ecd OPTIONS (
    column_name 'redund_yes_ecd'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN comments OPTIONS (
    column_name 'comments'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN total_fibrecount OPTIONS (
    column_name 'total_fibrecount'
);
ALTER FOREIGN TABLE strategy.active_cabs ALTER COLUMN spur_schematic_link OPTIONS (
    column_name 'spur_schematic_link'
);


ALTER FOREIGN TABLE strategy.active_cabs OWNER TO postgres;

--
-- Name: area_of_interest; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.area_of_interest (
    id integer,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'area_of_interest'
);
ALTER FOREIGN TABLE strategy.area_of_interest ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.area_of_interest ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.area_of_interest OWNER TO postgres;

--
-- Name: borough_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.borough_test (
    borough character varying(80)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'borough_test'
);
ALTER FOREIGN TABLE strategy.borough_test ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);


ALTER FOREIGN TABLE strategy.borough_test OWNER TO postgres;

--
-- Name: boundary_costing; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing (
    id integer NOT NULL,
    name character varying(100),
    notes character varying(100),
    type text,
    borough text,
    olt character varying(20),
    status character varying(50),
    date_sent_to_planning date,
    created_by_user character varying,
    created_datetime timestamp without time zone,
    modified_by_user character varying,
    modified_datetime timestamp without time zone,
    total_premises numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    sdu_premises numeric,
    mdu_buildings bigint,
    sdu_buildings bigint,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    cab_name character varying,
    total_distance numeric,
    cluster_capex_budget numeric,
    mdu_low_capex numeric,
    sdu_low_capex numeric,
    capacity_low_capex numeric,
    civils_low_capex numeric,
    pia_ug_low_capex numeric,
    pia_oh_low_capex numeric,
    mdu_high_capex numeric,
    sdu_high_capex numeric,
    capacity_high_capex numeric,
    civils_high_capex numeric,
    pia_ug_high_capex numeric,
    pia_oh_high_capex numeric,
    mdu_wayleave_percent numeric,
    capex_low numeric,
    cppp_low numeric,
    capex_high numeric,
    cppp_high numeric,
    costing_datetime timestamp with time zone,
    geom public.geometry,
    wayleave_status character varying(100),
    network_status character varying(100),
    projects_raised_datetime timestamp without time zone,
    percent_ugl_to_ugc character varying(100),
    lead_project_id integer,
    parent_boundary_id integer,
    fibre_count integer,
    distribution_distance numeric,
    distribution_capex_low numeric,
    distribution_cppp_low numeric,
    distribution_capex_high numeric,
    distribution_cppp_high numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN olt OPTIONS (
    column_name 'olt'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN date_sent_to_planning OPTIONS (
    column_name 'date_sent_to_planning'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN created_by_user OPTIONS (
    column_name 'created_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN created_datetime OPTIONS (
    column_name 'created_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN modified_by_user OPTIONS (
    column_name 'modified_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN modified_datetime OPTIONS (
    column_name 'modified_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN total_premises OPTIONS (
    column_name 'total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN mdu_buildings OPTIONS (
    column_name 'mdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN sdu_buildings OPTIONS (
    column_name 'sdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN total_distance OPTIONS (
    column_name 'total_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN cluster_capex_budget OPTIONS (
    column_name 'cluster_capex_budget'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN mdu_low_capex OPTIONS (
    column_name 'mdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN sdu_low_capex OPTIONS (
    column_name 'sdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN capacity_low_capex OPTIONS (
    column_name 'capacity_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN civils_low_capex OPTIONS (
    column_name 'civils_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_low_capex OPTIONS (
    column_name 'pia_ug_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_oh_low_capex OPTIONS (
    column_name 'pia_oh_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN mdu_high_capex OPTIONS (
    column_name 'mdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN sdu_high_capex OPTIONS (
    column_name 'sdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN capacity_high_capex OPTIONS (
    column_name 'capacity_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN civils_high_capex OPTIONS (
    column_name 'civils_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_ug_high_capex OPTIONS (
    column_name 'pia_ug_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN pia_oh_high_capex OPTIONS (
    column_name 'pia_oh_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN mdu_wayleave_percent OPTIONS (
    column_name 'mdu_wayleave_percent'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN capex_low OPTIONS (
    column_name 'capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN cppp_low OPTIONS (
    column_name 'cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN capex_high OPTIONS (
    column_name 'capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN cppp_high OPTIONS (
    column_name 'cppp_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN costing_datetime OPTIONS (
    column_name 'costing_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN wayleave_status OPTIONS (
    column_name 'wayleave_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN network_status OPTIONS (
    column_name 'network_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN projects_raised_datetime OPTIONS (
    column_name 'projects_raised_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN percent_ugl_to_ugc OPTIONS (
    column_name 'percent_ugl_to_ugc'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN lead_project_id OPTIONS (
    column_name 'lead_project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN parent_boundary_id OPTIONS (
    column_name 'parent_boundary_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN fibre_count OPTIONS (
    column_name 'fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN distribution_distance OPTIONS (
    column_name 'distribution_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN distribution_capex_low OPTIONS (
    column_name 'distribution_capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN distribution_cppp_low OPTIONS (
    column_name 'distribution_cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN distribution_capex_high OPTIONS (
    column_name 'distribution_capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing ALTER COLUMN distribution_cppp_high OPTIONS (
    column_name 'distribution_cppp_high'
);


ALTER FOREIGN TABLE strategy.boundary_costing OWNER TO postgres;

--
-- Name: boundary_costing_access_routes; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_access_routes (
    id integer,
    name character varying(100),
    route_distance double precision,
    costing_datetime timestamp with time zone,
    geom public.geometry,
    route_type character varying(20)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_access_routes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_access_routes ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_access_routes ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_access_routes ALTER COLUMN route_distance OPTIONS (
    column_name 'route_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_access_routes ALTER COLUMN costing_datetime OPTIONS (
    column_name 'costing_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_access_routes ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_access_routes ALTER COLUMN route_type OPTIONS (
    column_name 'route_type'
);


ALTER FOREIGN TABLE strategy.boundary_costing_access_routes OWNER TO postgres;

--
-- Name: boundary_costing_backup; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_backup (
    id integer,
    name character varying(100),
    notes character varying(100),
    type text,
    borough text,
    olt character varying(20),
    status character varying(50),
    date_sent_to_planning date,
    created_by_user character varying,
    created_datetime timestamp without time zone,
    modified_by_user character varying,
    modified_datetime timestamp without time zone,
    total_premises numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    sdu_premises numeric,
    mdu_buildings bigint,
    sdu_buildings bigint,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    cab_name character varying,
    total_distance numeric,
    cluster_capex_budget numeric,
    mdu_low_capex numeric,
    sdu_low_capex numeric,
    capacity_low_capex numeric,
    civils_low_capex numeric,
    pia_ug_low_capex numeric,
    pia_oh_low_capex numeric,
    mdu_high_capex numeric,
    sdu_high_capex numeric,
    capacity_high_capex numeric,
    civils_high_capex numeric,
    pia_ug_high_capex numeric,
    pia_oh_high_capex numeric,
    mdu_wayleave_percent numeric,
    capex_low numeric,
    cppp_low numeric,
    capex_high numeric,
    cppp_high numeric,
    costing_datetime timestamp with time zone,
    geom public.geometry,
    wayleave_status character varying(100),
    network_status character varying(100),
    projects_raised_datetime timestamp without time zone,
    percent_ugl_to_ugc character varying(100),
    lead_project_id integer,
    parent_boundary_id integer,
    fibre_count integer,
    distribution_distance numeric,
    distribution_capex_low numeric,
    distribution_cppp_low numeric,
    distribution_capex_high numeric,
    distribution_cppp_high numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_backup'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN olt OPTIONS (
    column_name 'olt'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN date_sent_to_planning OPTIONS (
    column_name 'date_sent_to_planning'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN created_by_user OPTIONS (
    column_name 'created_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN created_datetime OPTIONS (
    column_name 'created_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN modified_by_user OPTIONS (
    column_name 'modified_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN modified_datetime OPTIONS (
    column_name 'modified_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN total_premises OPTIONS (
    column_name 'total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN mdu_buildings OPTIONS (
    column_name 'mdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN sdu_buildings OPTIONS (
    column_name 'sdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN total_distance OPTIONS (
    column_name 'total_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN cluster_capex_budget OPTIONS (
    column_name 'cluster_capex_budget'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN mdu_low_capex OPTIONS (
    column_name 'mdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN sdu_low_capex OPTIONS (
    column_name 'sdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN capacity_low_capex OPTIONS (
    column_name 'capacity_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN civils_low_capex OPTIONS (
    column_name 'civils_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_low_capex OPTIONS (
    column_name 'pia_ug_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_oh_low_capex OPTIONS (
    column_name 'pia_oh_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN mdu_high_capex OPTIONS (
    column_name 'mdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN sdu_high_capex OPTIONS (
    column_name 'sdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN capacity_high_capex OPTIONS (
    column_name 'capacity_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN civils_high_capex OPTIONS (
    column_name 'civils_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_ug_high_capex OPTIONS (
    column_name 'pia_ug_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN pia_oh_high_capex OPTIONS (
    column_name 'pia_oh_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN mdu_wayleave_percent OPTIONS (
    column_name 'mdu_wayleave_percent'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN capex_low OPTIONS (
    column_name 'capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN cppp_low OPTIONS (
    column_name 'cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN capex_high OPTIONS (
    column_name 'capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN cppp_high OPTIONS (
    column_name 'cppp_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN costing_datetime OPTIONS (
    column_name 'costing_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN wayleave_status OPTIONS (
    column_name 'wayleave_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN network_status OPTIONS (
    column_name 'network_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN projects_raised_datetime OPTIONS (
    column_name 'projects_raised_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN percent_ugl_to_ugc OPTIONS (
    column_name 'percent_ugl_to_ugc'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN lead_project_id OPTIONS (
    column_name 'lead_project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN parent_boundary_id OPTIONS (
    column_name 'parent_boundary_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN fibre_count OPTIONS (
    column_name 'fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN distribution_distance OPTIONS (
    column_name 'distribution_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN distribution_capex_low OPTIONS (
    column_name 'distribution_capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN distribution_cppp_low OPTIONS (
    column_name 'distribution_cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN distribution_capex_high OPTIONS (
    column_name 'distribution_capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup ALTER COLUMN distribution_cppp_high OPTIONS (
    column_name 'distribution_cppp_high'
);


ALTER FOREIGN TABLE strategy.boundary_costing_backup OWNER TO postgres;

--
-- Name: boundary_costing_backup_20230412; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_backup_20230412 (
    id integer,
    name character varying(100),
    notes character varying(100),
    type text,
    borough text,
    olt character varying(20),
    status character varying(50),
    date_sent_to_planning date,
    total_premises numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    sdu_premises numeric,
    mdu_buildings bigint,
    sdu_buildings bigint,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    cab_name character varying,
    total_distance numeric,
    cluster_capex_budget numeric,
    mdu_low_capex numeric,
    sdu_low_capex numeric,
    capacity_low_capex numeric,
    civils_low_capex numeric,
    pia_ug_low_capex numeric,
    pia_oh_low_capex numeric,
    mdu_high_capex numeric,
    sdu_high_capex numeric,
    capacity_high_capex numeric,
    civils_high_capex numeric,
    pia_ug_high_capex numeric,
    pia_oh_high_capex numeric,
    mdu_wayleave_percent numeric,
    capex_low numeric,
    cppp_low numeric,
    capex_high numeric,
    cppp_high numeric,
    costing_datetime timestamp with time zone,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_backup_20230412'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN olt OPTIONS (
    column_name 'olt'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN date_sent_to_planning OPTIONS (
    column_name 'date_sent_to_planning'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN total_premises OPTIONS (
    column_name 'total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN mdu_buildings OPTIONS (
    column_name 'mdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN sdu_buildings OPTIONS (
    column_name 'sdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN total_distance OPTIONS (
    column_name 'total_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN cluster_capex_budget OPTIONS (
    column_name 'cluster_capex_budget'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN mdu_low_capex OPTIONS (
    column_name 'mdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN sdu_low_capex OPTIONS (
    column_name 'sdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN capacity_low_capex OPTIONS (
    column_name 'capacity_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN civils_low_capex OPTIONS (
    column_name 'civils_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_low_capex OPTIONS (
    column_name 'pia_ug_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_oh_low_capex OPTIONS (
    column_name 'pia_oh_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN mdu_high_capex OPTIONS (
    column_name 'mdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN sdu_high_capex OPTIONS (
    column_name 'sdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN capacity_high_capex OPTIONS (
    column_name 'capacity_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN civils_high_capex OPTIONS (
    column_name 'civils_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_ug_high_capex OPTIONS (
    column_name 'pia_ug_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN pia_oh_high_capex OPTIONS (
    column_name 'pia_oh_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN mdu_wayleave_percent OPTIONS (
    column_name 'mdu_wayleave_percent'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN capex_low OPTIONS (
    column_name 'capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN cppp_low OPTIONS (
    column_name 'cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN capex_high OPTIONS (
    column_name 'capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN cppp_high OPTIONS (
    column_name 'cppp_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN costing_datetime OPTIONS (
    column_name 'costing_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_backup_20230412 OWNER TO postgres;

--
-- Name: boundary_costing_core_routes; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_core_routes (
    id integer,
    name character varying(100),
    core_route_id bigint,
    core_route_distance double precision,
    cab_name character varying,
    costing_datetime timestamp with time zone,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_core_routes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_core_routes ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_core_routes ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_core_routes ALTER COLUMN core_route_id OPTIONS (
    column_name 'core_route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_core_routes ALTER COLUMN core_route_distance OPTIONS (
    column_name 'core_route_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_core_routes ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_core_routes ALTER COLUMN costing_datetime OPTIONS (
    column_name 'costing_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_core_routes ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_core_routes OWNER TO postgres;

--
-- Name: boundary_costing_input; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_input (
    id integer NOT NULL,
    name character varying(100),
    notes character varying(100),
    type text,
    borough text,
    olt character varying(20),
    geom public.geometry,
    status character varying(50),
    date_sent_to_planning date,
    created_by_user character varying,
    created_datetime timestamp without time zone,
    modified_by_user character varying,
    modified_datetime timestamp without time zone,
    wayleave_status character varying(100),
    network_status character varying(100),
    projects_raised_datetime timestamp without time zone,
    lead_project_id integer,
    parent_boundary_id integer
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_input'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN olt OPTIONS (
    column_name 'olt'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN date_sent_to_planning OPTIONS (
    column_name 'date_sent_to_planning'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN created_by_user OPTIONS (
    column_name 'created_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN created_datetime OPTIONS (
    column_name 'created_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN modified_by_user OPTIONS (
    column_name 'modified_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN modified_datetime OPTIONS (
    column_name 'modified_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN wayleave_status OPTIONS (
    column_name 'wayleave_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN network_status OPTIONS (
    column_name 'network_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN projects_raised_datetime OPTIONS (
    column_name 'projects_raised_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN lead_project_id OPTIONS (
    column_name 'lead_project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input ALTER COLUMN parent_boundary_id OPTIONS (
    column_name 'parent_boundary_id'
);


ALTER FOREIGN TABLE strategy.boundary_costing_input OWNER TO postgres;

--
-- Name: boundary_costing_input_archive; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_input_archive (
    id integer,
    name character varying(100),
    notes character varying(100),
    type text,
    borough text,
    olt character varying(20),
    geom public.geometry,
    status character varying(50),
    date_sent_to_planning date
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_input_archive'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN olt OPTIONS (
    column_name 'olt'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_archive ALTER COLUMN date_sent_to_planning OPTIONS (
    column_name 'date_sent_to_planning'
);


ALTER FOREIGN TABLE strategy.boundary_costing_input_archive OWNER TO postgres;

--
-- Name: boundary_costing_input_backup_20230403; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 (
    id integer,
    name character varying(100),
    notes character varying(100),
    type text,
    borough text,
    olt character varying(20),
    geom public.geometry,
    status character varying(50),
    date_sent_to_planning date
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_input_backup_20230403'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN olt OPTIONS (
    column_name 'olt'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 ALTER COLUMN date_sent_to_planning OPTIONS (
    column_name 'date_sent_to_planning'
);


ALTER FOREIGN TABLE strategy.boundary_costing_input_backup_20230403 OWNER TO postgres;

--
-- Name: boundary_costing_input_point; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_input_point (
    id integer NOT NULL,
    type character varying(20),
    name character varying(100),
    notes character varying(100),
    geom public.geometry,
    boundary_id integer,
    borough character varying(100),
    parent_point_id integer
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_input_point'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN boundary_id OPTIONS (
    column_name 'boundary_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_point ALTER COLUMN parent_point_id OPTIONS (
    column_name 'parent_point_id'
);


ALTER FOREIGN TABLE strategy.boundary_costing_input_point OWNER TO postgres;

--
-- Name: boundary_costing_input_processing; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_input_processing (
    id integer,
    name character varying(100),
    notes character varying(100),
    type text,
    borough text,
    olt character varying(20),
    geom public.geometry,
    status character varying(50),
    date_sent_to_planning date,
    created_by_user character varying,
    created_datetime timestamp without time zone,
    modified_by_user character varying,
    modified_datetime timestamp without time zone,
    wayleave_status character varying(100),
    network_status character varying(100),
    projects_raised_datetime timestamp without time zone,
    lead_project_id integer,
    parent_boundary_id integer
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_input_processing'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN notes OPTIONS (
    column_name 'notes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN olt OPTIONS (
    column_name 'olt'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN date_sent_to_planning OPTIONS (
    column_name 'date_sent_to_planning'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN created_by_user OPTIONS (
    column_name 'created_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN created_datetime OPTIONS (
    column_name 'created_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN modified_by_user OPTIONS (
    column_name 'modified_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN modified_datetime OPTIONS (
    column_name 'modified_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN wayleave_status OPTIONS (
    column_name 'wayleave_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN network_status OPTIONS (
    column_name 'network_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN projects_raised_datetime OPTIONS (
    column_name 'projects_raised_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN lead_project_id OPTIONS (
    column_name 'lead_project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_input_processing ALTER COLUMN parent_boundary_id OPTIONS (
    column_name 'parent_boundary_id'
);


ALTER FOREIGN TABLE strategy.boundary_costing_input_processing OWNER TO postgres;

--
-- Name: boundary_costing_nearest_neighbours; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_nearest_neighbours (
    id integer,
    neighbour_id integer,
    name character varying(100),
    geom public.geometry,
    distance double precision
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_nearest_neighbours'
);
ALTER FOREIGN TABLE strategy.boundary_costing_nearest_neighbours ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_nearest_neighbours ALTER COLUMN neighbour_id OPTIONS (
    column_name 'neighbour_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_nearest_neighbours ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_nearest_neighbours ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_nearest_neighbours ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);


ALTER FOREIGN TABLE strategy.boundary_costing_nearest_neighbours OWNER TO postgres;

--
-- Name: boundary_costing_network_topo; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_network_topo (
    project_id integer,
    id character varying,
    type character varying,
    classes text,
    grabbable boolean,
    pannable boolean,
    parent_id integer
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_network_topo'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo ALTER COLUMN project_id OPTIONS (
    column_name 'project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo ALTER COLUMN classes OPTIONS (
    column_name 'classes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo ALTER COLUMN grabbable OPTIONS (
    column_name 'grabbable'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo ALTER COLUMN pannable OPTIONS (
    column_name 'pannable'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo ALTER COLUMN parent_id OPTIONS (
    column_name 'parent_id'
);


ALTER FOREIGN TABLE strategy.boundary_costing_network_topo OWNER TO postgres;

--
-- Name: boundary_costing_network_topo_links; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_network_topo_links (
    project_id integer,
    id text,
    source character varying,
    target character varying,
    type text,
    grabbable boolean,
    pannable boolean
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_network_topo_links'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links ALTER COLUMN project_id OPTIONS (
    column_name 'project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links ALTER COLUMN source OPTIONS (
    column_name 'source'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links ALTER COLUMN target OPTIONS (
    column_name 'target'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links ALTER COLUMN grabbable OPTIONS (
    column_name 'grabbable'
);
ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links ALTER COLUMN pannable OPTIONS (
    column_name 'pannable'
);


ALTER FOREIGN TABLE strategy.boundary_costing_network_topo_links OWNER TO postgres;

--
-- Name: boundary_costing_project_creation_output_premise_list; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list (
    sprn integer,
    building_type text,
    postcode character varying(8),
    block text,
    address text,
    status smallint,
    project_id integer,
    geom text,
    class_type text,
    uprn bigint,
    classification_code character varying,
    cab_name character varying,
    cluster_id character varying(100),
    lead_project integer,
    pia_type text
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_project_creation_output_premise_list'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN postcode OPTIONS (
    column_name 'postcode'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN block OPTIONS (
    column_name 'block'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN address OPTIONS (
    column_name 'address'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN project_id OPTIONS (
    column_name 'project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN class_type OPTIONS (
    column_name 'class_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN uprn OPTIONS (
    column_name 'uprn'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN classification_code OPTIONS (
    column_name 'classification_code'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN cluster_id OPTIONS (
    column_name 'cluster_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN lead_project OPTIONS (
    column_name 'lead_project'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);


ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_output_premise_list OWNER TO postgres;

--
-- Name: boundary_costing_project_creation_premises_to_process; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process (
    name character varying(100),
    sprn integer,
    building_type text,
    class_type text,
    status smallint,
    project_id integer,
    classification text,
    new_project_type text,
    bd_status smallint,
    sprn_in_pt integer,
    geom public.geometry(Point,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_project_creation_premises_to_process'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN class_type OPTIONS (
    column_name 'class_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN project_id OPTIONS (
    column_name 'project_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN classification OPTIONS (
    column_name 'classification'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN new_project_type OPTIONS (
    column_name 'new_project_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN bd_status OPTIONS (
    column_name 'bd_status'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN sprn_in_pt OPTIONS (
    column_name 'sprn_in_pt'
);
ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_project_creation_premises_to_process OWNER TO postgres;

--
-- Name: boundary_costing_ring_routes; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_ring_routes (
    id integer NOT NULL,
    source_cab character varying(50),
    destination_cab character varying(50),
    route_length numeric,
    created_by_user character varying(100),
    created_datetime timestamp without time zone,
    modified_by_user character varying(100),
    modified_datetime timestamp without time zone,
    route_calculated_datetime timestamp without time zone,
    geom public.geometry,
    waypoint_1 integer,
    waypoint_2 integer,
    waypoint_3 integer,
    ring_ref character varying(100),
    geom_input public.geometry,
    geom_failed public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_ring_routes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN source_cab OPTIONS (
    column_name 'source_cab'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN destination_cab OPTIONS (
    column_name 'destination_cab'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN route_length OPTIONS (
    column_name 'route_length'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN created_by_user OPTIONS (
    column_name 'created_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN created_datetime OPTIONS (
    column_name 'created_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN modified_by_user OPTIONS (
    column_name 'modified_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN modified_datetime OPTIONS (
    column_name 'modified_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN route_calculated_datetime OPTIONS (
    column_name 'route_calculated_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN waypoint_1 OPTIONS (
    column_name 'waypoint_1'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN waypoint_2 OPTIONS (
    column_name 'waypoint_2'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN waypoint_3 OPTIONS (
    column_name 'waypoint_3'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN ring_ref OPTIONS (
    column_name 'ring_ref'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN geom_input OPTIONS (
    column_name 'geom_input'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes ALTER COLUMN geom_failed OPTIONS (
    column_name 'geom_failed'
);


ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes OWNER TO postgres;

--
-- Name: boundary_costing_ring_routes_processing; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_ring_routes_processing (
    id integer NOT NULL,
    source_cab character varying(50),
    destination_cab character varying(50),
    route_length numeric,
    created_by_user character varying(100),
    created_datetime timestamp without time zone,
    modified_by_user character varying(100),
    modified_datetime timestamp without time zone,
    route_calculated_datetime timestamp without time zone,
    geom public.geometry,
    waypoint_1 integer,
    waypoint_2 integer,
    waypoint_3 integer,
    ring_ref character varying(100)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_ring_routes_processing'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN source_cab OPTIONS (
    column_name 'source_cab'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN destination_cab OPTIONS (
    column_name 'destination_cab'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN route_length OPTIONS (
    column_name 'route_length'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN created_by_user OPTIONS (
    column_name 'created_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN created_datetime OPTIONS (
    column_name 'created_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN modified_by_user OPTIONS (
    column_name 'modified_by_user'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN modified_datetime OPTIONS (
    column_name 'modified_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN route_calculated_datetime OPTIONS (
    column_name 'route_calculated_datetime'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN waypoint_1 OPTIONS (
    column_name 'waypoint_1'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN waypoint_2 OPTIONS (
    column_name 'waypoint_2'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN waypoint_3 OPTIONS (
    column_name 'waypoint_3'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing ALTER COLUMN ring_ref OPTIONS (
    column_name 'ring_ref'
);


ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_processing OWNER TO postgres;

--
-- Name: boundary_costing_ring_routes_waypoints; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_ring_routes_waypoints (
    id integer NOT NULL,
    ref character varying,
    route_id integer,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_ring_routes_waypoints'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_waypoints ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_waypoints ALTER COLUMN ref OPTIONS (
    column_name 'ref'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_waypoints ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_waypoints ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_ring_routes_waypoints OWNER TO postgres;

--
-- Name: boundary_costing_st6_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_st6_test (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_st6_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_st6_test ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);


ALTER FOREIGN TABLE strategy.boundary_costing_st6_test OWNER TO postgres;

--
-- Name: boundary_costing_stg0; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg0 (
    id integer,
    fid character varying(20),
    sprn integer,
    borough text,
    building_premises bigint,
    building_type text,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    mdu_with_wayleave bigint,
    mdu_with_wayleave_t50 bigint,
    mdu_with_wayleave_other bigint,
    geom public.geometry,
    r bigint,
    percent_ugl_to_ugc numeric,
    premise_fiber_at_cab numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg0'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN mdu_with_wayleave_t50 OPTIONS (
    column_name 'mdu_with_wayleave_t50'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN mdu_with_wayleave_other OPTIONS (
    column_name 'mdu_with_wayleave_other'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN percent_ugl_to_ugc OPTIONS (
    column_name 'percent_ugl_to_ugc'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0 ALTER COLUMN premise_fiber_at_cab OPTIONS (
    column_name 'premise_fiber_at_cab'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg0 OWNER TO postgres;

--
-- Name: boundary_costing_stg0_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg0_test (
    id integer,
    fid character varying(20),
    sprn integer,
    borough character varying(50),
    building_premises bigint,
    building_type text,
    pia_type text,
    node_id bigint,
    mdu_with_wayleave bigint,
    mdu_with_wayleave_t50 bigint,
    mdu_with_wayleave_other bigint,
    geom public.geometry,
    r bigint,
    percent_ugl_to_ugc numeric,
    premise_fiber_at_cab numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg0_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN mdu_with_wayleave_t50 OPTIONS (
    column_name 'mdu_with_wayleave_t50'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN mdu_with_wayleave_other OPTIONS (
    column_name 'mdu_with_wayleave_other'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN percent_ugl_to_ugc OPTIONS (
    column_name 'percent_ugl_to_ugc'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test ALTER COLUMN premise_fiber_at_cab OPTIONS (
    column_name 'premise_fiber_at_cab'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg0_test OWNER TO postgres;

--
-- Name: boundary_costing_stg1; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg1 (
    id integer,
    borough character varying,
    cluster_premise_count numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    mdu_with_wayleave_t50 numeric,
    mdu_with_wayleave_other numeric,
    sdu_premises numeric,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg1'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN cluster_premise_count OPTIONS (
    column_name 'cluster_premise_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN mdu_with_wayleave_t50 OPTIONS (
    column_name 'mdu_with_wayleave_t50'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN mdu_with_wayleave_other OPTIONS (
    column_name 'mdu_with_wayleave_other'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg1 OWNER TO postgres;

--
-- Name: boundary_costing_stg1_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg1_test (
    id integer,
    borough character varying,
    cluster_premise_count numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    mdu_with_wayleave_t50 numeric,
    mdu_with_wayleave_other numeric,
    sdu_premises numeric,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg1_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN cluster_premise_count OPTIONS (
    column_name 'cluster_premise_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN mdu_with_wayleave_t50 OPTIONS (
    column_name 'mdu_with_wayleave_t50'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN mdu_with_wayleave_other OPTIONS (
    column_name 'mdu_with_wayleave_other'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg1_test OWNER TO postgres;

--
-- Name: boundary_costing_stg2; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg2 (
    id integer,
    borough character varying,
    cluster_premise_count numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    mdu_with_wayleave_t50 numeric,
    mdu_with_wayleave_other numeric,
    sdu_premises numeric,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    geom public.geometry,
    centroid public.geometry,
    center_type text,
    type character varying(20),
    child_count bigint,
    point_id integer,
    parent_point_id integer,
    r bigint,
    vertice_id bigint,
    distance double precision
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg2'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN cluster_premise_count OPTIONS (
    column_name 'cluster_premise_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN mdu_with_wayleave_t50 OPTIONS (
    column_name 'mdu_with_wayleave_t50'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN mdu_with_wayleave_other OPTIONS (
    column_name 'mdu_with_wayleave_other'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN centroid OPTIONS (
    column_name 'centroid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN center_type OPTIONS (
    column_name 'center_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN child_count OPTIONS (
    column_name 'child_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN point_id OPTIONS (
    column_name 'point_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN parent_point_id OPTIONS (
    column_name 'parent_point_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN vertice_id OPTIONS (
    column_name 'vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2 ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg2 OWNER TO postgres;

--
-- Name: boundary_costing_stg2_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg2_test (
    id integer,
    borough character varying,
    cluster_premise_count numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    mdu_with_wayleave_t50 numeric,
    mdu_with_wayleave_other numeric,
    sdu_premises numeric,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    geom public.geometry,
    centroid public.geometry,
    center_type text,
    r bigint,
    vertice_id bigint,
    distance double precision
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg2_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN cluster_premise_count OPTIONS (
    column_name 'cluster_premise_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN mdu_with_wayleave_t50 OPTIONS (
    column_name 'mdu_with_wayleave_t50'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN mdu_with_wayleave_other OPTIONS (
    column_name 'mdu_with_wayleave_other'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN centroid OPTIONS (
    column_name 'centroid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN center_type OPTIONS (
    column_name 'center_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN vertice_id OPTIONS (
    column_name 'vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg2_test OWNER TO postgres;

--
-- Name: boundary_costing_stg3; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg3 (
    core_route_id bigint,
    id integer,
    vertice_id bigint,
    cab_id bigint,
    cab_name character varying,
    cab_vertice_id bigint,
    line_geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg3'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3 ALTER COLUMN core_route_id OPTIONS (
    column_name 'core_route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3 ALTER COLUMN vertice_id OPTIONS (
    column_name 'vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3 ALTER COLUMN cab_id OPTIONS (
    column_name 'cab_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3 ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3 ALTER COLUMN cab_vertice_id OPTIONS (
    column_name 'cab_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3 ALTER COLUMN line_geom OPTIONS (
    column_name 'line_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg3 OWNER TO postgres;

--
-- Name: boundary_costing_stg3_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg3_test (
    core_route_id bigint,
    id integer,
    vertice_id bigint,
    cab_id bigint,
    cab_name character varying,
    cab_vertice_id bigint,
    line_geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg3_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test ALTER COLUMN core_route_id OPTIONS (
    column_name 'core_route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test ALTER COLUMN vertice_id OPTIONS (
    column_name 'vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test ALTER COLUMN cab_id OPTIONS (
    column_name 'cab_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test ALTER COLUMN cab_vertice_id OPTIONS (
    column_name 'cab_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test ALTER COLUMN line_geom OPTIONS (
    column_name 'line_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg3_test OWNER TO postgres;

--
-- Name: boundary_costing_stg4; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg4 (
    core_route_id bigint,
    id integer,
    vertice_id bigint,
    cab_id bigint,
    cab_name character varying,
    cab_vertice_id bigint,
    line_geom public.geometry,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg4'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN core_route_id OPTIONS (
    column_name 'core_route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN vertice_id OPTIONS (
    column_name 'vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN cab_id OPTIONS (
    column_name 'cab_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN cab_vertice_id OPTIONS (
    column_name 'cab_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN line_geom OPTIONS (
    column_name 'line_geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg4 OWNER TO postgres;

--
-- Name: boundary_costing_stg4_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg4_test (
    core_route_id bigint,
    id integer,
    vertice_id bigint,
    cab_id bigint,
    cab_name character varying,
    cab_vertice_id bigint,
    line_geom public.geometry,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg4_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN core_route_id OPTIONS (
    column_name 'core_route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN vertice_id OPTIONS (
    column_name 'vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN cab_id OPTIONS (
    column_name 'cab_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN cab_vertice_id OPTIONS (
    column_name 'cab_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN line_geom OPTIONS (
    column_name 'line_geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg4_test OWNER TO postgres;

--
-- Name: boundary_costing_stg5; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg5 (
    core_route_id bigint,
    id integer,
    cab_name character varying,
    core_route_distance double precision,
    geom public.geometry,
    route_rank bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg5'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5 ALTER COLUMN core_route_id OPTIONS (
    column_name 'core_route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5 ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5 ALTER COLUMN core_route_distance OPTIONS (
    column_name 'core_route_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5 ALTER COLUMN route_rank OPTIONS (
    column_name 'route_rank'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg5 OWNER TO postgres;

--
-- Name: boundary_costing_stg5_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg5_test (
    core_route_id bigint,
    id integer,
    cab_name character varying,
    core_route_distance double precision,
    geom public.geometry,
    route_rank bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg5_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5_test ALTER COLUMN core_route_id OPTIONS (
    column_name 'core_route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5_test ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5_test ALTER COLUMN core_route_distance OPTIONS (
    column_name 'core_route_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5_test ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg5_test ALTER COLUMN route_rank OPTIONS (
    column_name 'route_rank'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg5_test OWNER TO postgres;

--
-- Name: boundary_costing_stg6; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg6 (
    route_id bigint,
    fid character varying(20),
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    cluster_center_vertice_id bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg6'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg6 OWNER TO postgres;

--
-- Name: boundary_costing_stg6_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg6_test (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg6_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg6_test OWNER TO postgres;

--
-- Name: boundary_costing_stg7; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7 (
    route_id bigint,
    fid character varying(20),
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    cluster_center_vertice_id bigint,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_pass1; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_pass1 (
    route_id bigint,
    fid character varying(20),
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    cluster_center_vertice_id bigint,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_pass1'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass1 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_pass2; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_pass2 (
    route_id bigint,
    fid character varying(20),
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    cluster_center_vertice_id bigint,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_pass2'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass2 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_pass3; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_pass3 (
    route_id bigint,
    fid character varying(20),
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    cluster_center_vertice_id bigint,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_pass3'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass3 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_pass4; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_pass4 (
    route_id bigint,
    fid character varying(20),
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    cluster_center_vertice_id bigint,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_pass4'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass4 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_pass5; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_pass5 (
    route_id bigint,
    fid character varying(20),
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    cluster_center_vertice_id bigint,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_pass5'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_pass5 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_test (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test OWNER TO postgres;

--
-- Name: boundary_costing_stg7_test_fibrecounts; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts (
    edge bigint,
    node bigint,
    fibres numeric,
    premises numeric,
    span_geom public.geometry(MultiLineString,27700),
    node_geom public.geometry(Point,27700),
    edges bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_test_fibrecounts'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts ALTER COLUMN fibres OPTIONS (
    column_name 'fibres'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts ALTER COLUMN premises OPTIONS (
    column_name 'premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts ALTER COLUMN span_geom OPTIONS (
    column_name 'span_geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts ALTER COLUMN node_geom OPTIONS (
    column_name 'node_geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts ALTER COLUMN edges OPTIONS (
    column_name 'edges'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_fibrecounts OWNER TO postgres;

--
-- Name: boundary_costing_stg7_test_pass1; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_test_pass1'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass1 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_test_pass2; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_test_pass2'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass2 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_test_pass3; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_test_pass3'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass3 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_test_pass4; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_test_pass4'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass4 OWNER TO postgres;

--
-- Name: boundary_costing_stg7_test_pass5; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 (
    route_id bigint,
    fid character varying(20),
    building_type text,
    building_premises bigint,
    pia_type text,
    node_id bigint,
    span_coupler_objectid bigint,
    pole_objectid bigint,
    chamber_objectid bigint,
    id integer,
    r bigint,
    route_total_premises numeric,
    route_sdu_premises numeric,
    route_mdu_premises numeric,
    building_fibre_count numeric,
    cluster_center_vertice_id bigint,
    route_sdu_count bigint,
    route_mdu_count bigint,
    route_fibre_count numeric,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg7_test_pass5'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN node_id OPTIONS (
    column_name 'node_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN span_coupler_objectid OPTIONS (
    column_name 'span_coupler_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN pole_objectid OPTIONS (
    column_name 'pole_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN chamber_objectid OPTIONS (
    column_name 'chamber_objectid'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN route_total_premises OPTIONS (
    column_name 'route_total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN route_sdu_premises OPTIONS (
    column_name 'route_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN route_mdu_premises OPTIONS (
    column_name 'route_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN building_fibre_count OPTIONS (
    column_name 'building_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN cluster_center_vertice_id OPTIONS (
    column_name 'cluster_center_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN route_sdu_count OPTIONS (
    column_name 'route_sdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN route_mdu_count OPTIONS (
    column_name 'route_mdu_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN route_fibre_count OPTIONS (
    column_name 'route_fibre_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg7_test_pass5 OWNER TO postgres;

--
-- Name: boundary_costing_stg8; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8 (
    id integer,
    edge_count bigint,
    distance double precision,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8 ALTER COLUMN edge_count OPTIONS (
    column_name 'edge_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8 ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8 OWNER TO postgres;

--
-- Name: boundary_costing_stg8_a_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8_a_test (
    route_id bigint,
    route_premises numeric,
    geom public.geometry,
    route_length double precision
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8_a_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_a_test ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_a_test ALTER COLUMN route_premises OPTIONS (
    column_name 'route_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_a_test ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_a_test ALTER COLUMN route_length OPTIONS (
    column_name 'route_length'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8_a_test OWNER TO postgres;

--
-- Name: boundary_costing_stg8_access; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8_access (
    id integer,
    route_id bigint,
    type character varying(20),
    distance double precision,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8_access'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access OWNER TO postgres;

--
-- Name: boundary_costing_stg8_access_stg0; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 (
    route_id bigint,
    id integer,
    point_id integer,
    vertice_id bigint,
    parent_point_id integer,
    type character varying(20),
    parent_vertice_id bigint,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8_access_stg0'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN point_id OPTIONS (
    column_name 'point_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN vertice_id OPTIONS (
    column_name 'vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN parent_point_id OPTIONS (
    column_name 'parent_point_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN parent_vertice_id OPTIONS (
    column_name 'parent_vertice_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8_access_stg0 OWNER TO postgres;

--
-- Name: boundary_costing_stg8_drop; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8_drop (
    id integer,
    route_id bigint,
    type text,
    distance double precision,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8_drop'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_drop ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_drop ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_drop ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_drop ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_drop ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8_drop OWNER TO postgres;

--
-- Name: boundary_costing_stg8_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8_test (
    id integer,
    edge_count bigint,
    distance double precision,
    geom public.geometry
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_test ALTER COLUMN edge_count OPTIONS (
    column_name 'edge_count'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_test ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8_test ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8_test OWNER TO postgres;

--
-- Name: boundary_costing_stg8a; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8a (
    id integer,
    total_routes bigint,
    total_premises numeric,
    span_coupler_routed bigint,
    pole_routed bigint,
    chamber_routed bigint,
    span_coupler_not_routed bigint,
    pole_not_routed bigint,
    chamber_not_routed bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8a'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN total_routes OPTIONS (
    column_name 'total_routes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN total_premises OPTIONS (
    column_name 'total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN span_coupler_routed OPTIONS (
    column_name 'span_coupler_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN pole_routed OPTIONS (
    column_name 'pole_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN chamber_routed OPTIONS (
    column_name 'chamber_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN span_coupler_not_routed OPTIONS (
    column_name 'span_coupler_not_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN pole_not_routed OPTIONS (
    column_name 'pole_not_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a ALTER COLUMN chamber_not_routed OPTIONS (
    column_name 'chamber_not_routed'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8a OWNER TO postgres;

--
-- Name: boundary_costing_stg8a_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg8a_test (
    id integer,
    total_routes bigint,
    total_premises numeric,
    span_coupler_routed bigint,
    pole_routed bigint,
    chamber_routed bigint,
    span_coupler_not_routed bigint,
    pole_not_routed bigint,
    chamber_not_routed bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg8a_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN total_routes OPTIONS (
    column_name 'total_routes'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN total_premises OPTIONS (
    column_name 'total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN span_coupler_routed OPTIONS (
    column_name 'span_coupler_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN pole_routed OPTIONS (
    column_name 'pole_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN chamber_routed OPTIONS (
    column_name 'chamber_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN span_coupler_not_routed OPTIONS (
    column_name 'span_coupler_not_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN pole_not_routed OPTIONS (
    column_name 'pole_not_routed'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test ALTER COLUMN chamber_not_routed OPTIONS (
    column_name 'chamber_not_routed'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg8a_test OWNER TO postgres;

--
-- Name: boundary_costing_stg9; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg9 (
    id integer,
    total_premises numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    sdu_premises numeric,
    mdu_buildings bigint,
    sdu_buildings bigint,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    cab_name character varying,
    total_distance numeric,
    cluster_capex_budget numeric,
    mdu_low_capex numeric,
    sdu_low_capex numeric,
    capacity_low_capex numeric,
    civils_low_capex numeric,
    pia_ug_low_capex numeric,
    pia_oh_low_capex numeric,
    mdu_high_capex numeric,
    sdu_high_capex numeric,
    capacity_high_capex numeric,
    civils_high_capex numeric,
    pia_ug_high_capex numeric,
    pia_oh_high_capex numeric,
    mdu_wayleave_percent numeric,
    capex_low numeric,
    cppp_low numeric,
    capex_high numeric,
    cppp_high numeric,
    geom public.geometry,
    percent_ugl_to_ugc numeric,
    premise_fiber_at_cab numeric,
    parent_boundary_id integer,
    distribution_distance numeric,
    distribution_capex_low numeric,
    distribution_cppp_low numeric,
    distribution_capex_high numeric,
    distribution_cppp_high numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg9'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN total_premises OPTIONS (
    column_name 'total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN mdu_buildings OPTIONS (
    column_name 'mdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN sdu_buildings OPTIONS (
    column_name 'sdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN total_distance OPTIONS (
    column_name 'total_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN cluster_capex_budget OPTIONS (
    column_name 'cluster_capex_budget'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN mdu_low_capex OPTIONS (
    column_name 'mdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN sdu_low_capex OPTIONS (
    column_name 'sdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN capacity_low_capex OPTIONS (
    column_name 'capacity_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN civils_low_capex OPTIONS (
    column_name 'civils_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_low_capex OPTIONS (
    column_name 'pia_ug_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_oh_low_capex OPTIONS (
    column_name 'pia_oh_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN mdu_high_capex OPTIONS (
    column_name 'mdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN sdu_high_capex OPTIONS (
    column_name 'sdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN capacity_high_capex OPTIONS (
    column_name 'capacity_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN civils_high_capex OPTIONS (
    column_name 'civils_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_ug_high_capex OPTIONS (
    column_name 'pia_ug_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN pia_oh_high_capex OPTIONS (
    column_name 'pia_oh_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN mdu_wayleave_percent OPTIONS (
    column_name 'mdu_wayleave_percent'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN capex_low OPTIONS (
    column_name 'capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN cppp_low OPTIONS (
    column_name 'cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN capex_high OPTIONS (
    column_name 'capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN cppp_high OPTIONS (
    column_name 'cppp_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN percent_ugl_to_ugc OPTIONS (
    column_name 'percent_ugl_to_ugc'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN premise_fiber_at_cab OPTIONS (
    column_name 'premise_fiber_at_cab'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN parent_boundary_id OPTIONS (
    column_name 'parent_boundary_id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN distribution_distance OPTIONS (
    column_name 'distribution_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN distribution_capex_low OPTIONS (
    column_name 'distribution_capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN distribution_cppp_low OPTIONS (
    column_name 'distribution_cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN distribution_capex_high OPTIONS (
    column_name 'distribution_capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9 ALTER COLUMN distribution_cppp_high OPTIONS (
    column_name 'distribution_cppp_high'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg9 OWNER TO postgres;

--
-- Name: boundary_costing_stg9_test; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.boundary_costing_stg9_test (
    id integer,
    total_premises numeric,
    mdu_premises numeric,
    mdu_with_wayleave numeric,
    sdu_premises numeric,
    mdu_buildings bigint,
    sdu_buildings bigint,
    pia_oh_premises numeric,
    pia_ug_l_premises numeric,
    pia_ug_c_premises numeric,
    civils_premises numeric,
    pia_oh_mdu_premises numeric,
    pia_oh_sdu_premises numeric,
    pia_ug_l_mdu_premises numeric,
    pia_ug_l_sdu_premises numeric,
    pia_ug_c_mdu_premises numeric,
    pia_ug_c_sdu_premises numeric,
    civils_mdu_premises numeric,
    civils_sdu_premises numeric,
    cab_name character varying,
    total_distance numeric,
    cluster_capex_budget numeric,
    mdu_low_capex numeric,
    sdu_low_capex numeric,
    capacity_low_capex numeric,
    civils_low_capex numeric,
    pia_ug_low_capex numeric,
    pia_oh_low_capex numeric,
    mdu_high_capex numeric,
    sdu_high_capex numeric,
    capacity_high_capex numeric,
    civils_high_capex numeric,
    pia_ug_high_capex numeric,
    pia_oh_high_capex numeric,
    mdu_wayleave_percent numeric,
    capex_low numeric,
    cppp_low numeric,
    capex_high numeric,
    cppp_high numeric,
    geom public.geometry,
    percent_ugl_to_ugc numeric,
    premise_fiber_at_cab numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'boundary_costing_stg9_test'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN total_premises OPTIONS (
    column_name 'total_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN mdu_premises OPTIONS (
    column_name 'mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN mdu_with_wayleave OPTIONS (
    column_name 'mdu_with_wayleave'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN sdu_premises OPTIONS (
    column_name 'sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN mdu_buildings OPTIONS (
    column_name 'mdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN sdu_buildings OPTIONS (
    column_name 'sdu_buildings'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_oh_premises OPTIONS (
    column_name 'pia_oh_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_l_premises OPTIONS (
    column_name 'pia_ug_l_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_c_premises OPTIONS (
    column_name 'pia_ug_c_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN civils_premises OPTIONS (
    column_name 'civils_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_oh_mdu_premises OPTIONS (
    column_name 'pia_oh_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_oh_sdu_premises OPTIONS (
    column_name 'pia_oh_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_l_mdu_premises OPTIONS (
    column_name 'pia_ug_l_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_l_sdu_premises OPTIONS (
    column_name 'pia_ug_l_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_c_mdu_premises OPTIONS (
    column_name 'pia_ug_c_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_c_sdu_premises OPTIONS (
    column_name 'pia_ug_c_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN civils_mdu_premises OPTIONS (
    column_name 'civils_mdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN civils_sdu_premises OPTIONS (
    column_name 'civils_sdu_premises'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN total_distance OPTIONS (
    column_name 'total_distance'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN cluster_capex_budget OPTIONS (
    column_name 'cluster_capex_budget'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN mdu_low_capex OPTIONS (
    column_name 'mdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN sdu_low_capex OPTIONS (
    column_name 'sdu_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN capacity_low_capex OPTIONS (
    column_name 'capacity_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN civils_low_capex OPTIONS (
    column_name 'civils_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_low_capex OPTIONS (
    column_name 'pia_ug_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_oh_low_capex OPTIONS (
    column_name 'pia_oh_low_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN mdu_high_capex OPTIONS (
    column_name 'mdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN sdu_high_capex OPTIONS (
    column_name 'sdu_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN capacity_high_capex OPTIONS (
    column_name 'capacity_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN civils_high_capex OPTIONS (
    column_name 'civils_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_ug_high_capex OPTIONS (
    column_name 'pia_ug_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN pia_oh_high_capex OPTIONS (
    column_name 'pia_oh_high_capex'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN mdu_wayleave_percent OPTIONS (
    column_name 'mdu_wayleave_percent'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN capex_low OPTIONS (
    column_name 'capex_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN cppp_low OPTIONS (
    column_name 'cppp_low'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN capex_high OPTIONS (
    column_name 'capex_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN cppp_high OPTIONS (
    column_name 'cppp_high'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN percent_ugl_to_ugc OPTIONS (
    column_name 'percent_ugl_to_ugc'
);
ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test ALTER COLUMN premise_fiber_at_cab OPTIONS (
    column_name 'premise_fiber_at_cab'
);


ALTER FOREIGN TABLE strategy.boundary_costing_stg9_test OWNER TO postgres;

--
-- Name: building_age_lead_in_sprn; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.building_age_lead_in_sprn (
    sprn integer,
    fid character varying(20),
    percent_lead_in numeric,
    percent_not_lead_in numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'building_age_lead_in_sprn'
);
ALTER FOREIGN TABLE strategy.building_age_lead_in_sprn ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.building_age_lead_in_sprn ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.building_age_lead_in_sprn ALTER COLUMN percent_lead_in OPTIONS (
    column_name 'percent_lead_in'
);
ALTER FOREIGN TABLE strategy.building_age_lead_in_sprn ALTER COLUMN percent_not_lead_in OPTIONS (
    column_name 'percent_not_lead_in'
);


ALTER FOREIGN TABLE strategy.building_age_lead_in_sprn OWNER TO postgres;

--
-- Name: building_age_lead_in_toid; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.building_age_lead_in_toid (
    fid character varying(20),
    percent_lead_in numeric,
    percent_not_lead_in numeric
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'building_age_lead_in_toid'
);
ALTER FOREIGN TABLE strategy.building_age_lead_in_toid ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.building_age_lead_in_toid ALTER COLUMN percent_lead_in OPTIONS (
    column_name 'percent_lead_in'
);
ALTER FOREIGN TABLE strategy.building_age_lead_in_toid ALTER COLUMN percent_not_lead_in OPTIONS (
    column_name 'percent_not_lead_in'
);


ALTER FOREIGN TABLE strategy.building_age_lead_in_toid OWNER TO postgres;

--
-- Name: business_distance; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.business_distance (
    uprn bigint,
    sprn integer,
    fid character varying(20),
    borough character varying(50),
    building_type text,
    pia_type text,
    distance_calculation_status text,
    distance_calculation_reason text,
    route_equipmentname character varying,
    route_distance double precision,
    sl_equipmentname character varying(255),
    sl_distance double precision,
    address text,
    postcode character varying(8)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'business_distance'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN uprn OPTIONS (
    column_name 'uprn'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN distance_calculation_status OPTIONS (
    column_name 'distance_calculation_status'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN distance_calculation_reason OPTIONS (
    column_name 'distance_calculation_reason'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN route_equipmentname OPTIONS (
    column_name 'route_equipmentname'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN route_distance OPTIONS (
    column_name 'route_distance'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN sl_equipmentname OPTIONS (
    column_name 'sl_equipmentname'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN sl_distance OPTIONS (
    column_name 'sl_distance'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN address OPTIONS (
    column_name 'address'
);
ALTER FOREIGN TABLE strategy.business_distance ALTER COLUMN postcode OPTIONS (
    column_name 'postcode'
);


ALTER FOREIGN TABLE strategy.business_distance OWNER TO postgres;

--
-- Name: business_distance_stg0; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.business_distance_stg0 (
    sprn integer,
    fid character varying(20),
    borough character varying(50),
    mdu_id bigint,
    total_building_premises bigint,
    building_premises bigint,
    building_type text,
    closestcab_type text,
    closestcab_metrestocab double precision,
    pia_type text,
    project_id integer,
    status smallint,
    sales_status smallint,
    geom public.geometry(Polygon,27700),
    r bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'business_distance_stg0'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN mdu_id OPTIONS (
    column_name 'mdu_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN total_building_premises OPTIONS (
    column_name 'total_building_premises'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN closestcab_type OPTIONS (
    column_name 'closestcab_type'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN closestcab_metrestocab OPTIONS (
    column_name 'closestcab_metrestocab'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN project_id OPTIONS (
    column_name 'project_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN sales_status OPTIONS (
    column_name 'sales_status'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.business_distance_stg0 ALTER COLUMN r OPTIONS (
    column_name 'r'
);


ALTER FOREIGN TABLE strategy.business_distance_stg0 OWNER TO postgres;

--
-- Name: business_distance_stg1; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.business_distance_stg1 (
    sprn integer,
    fid character varying(20),
    borough character varying(50),
    mdu_id bigint,
    total_building_premises bigint,
    building_premises bigint,
    building_type text,
    closestcab_type text,
    closestcab_metrestocab double precision,
    pia_type text,
    project_id integer,
    status smallint,
    sales_status smallint,
    geom public.geometry(Polygon,27700),
    r bigint,
    id bigint,
    distance double precision
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'business_distance_stg1'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN mdu_id OPTIONS (
    column_name 'mdu_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN total_building_premises OPTIONS (
    column_name 'total_building_premises'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN building_premises OPTIONS (
    column_name 'building_premises'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN closestcab_type OPTIONS (
    column_name 'closestcab_type'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN closestcab_metrestocab OPTIONS (
    column_name 'closestcab_metrestocab'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN pia_type OPTIONS (
    column_name 'pia_type'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN project_id OPTIONS (
    column_name 'project_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN sales_status OPTIONS (
    column_name 'sales_status'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN r OPTIONS (
    column_name 'r'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg1 ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);


ALTER FOREIGN TABLE strategy.business_distance_stg1 OWNER TO postgres;

--
-- Name: business_distance_stg2; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.business_distance_stg2 (
    route_id bigint,
    fid character varying(20),
    fid_vertice_id bigint,
    equipmentid bigint,
    equipmentname character varying(255),
    equip_vertice_id bigint,
    distance double precision
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'business_distance_stg2'
);
ALTER FOREIGN TABLE strategy.business_distance_stg2 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg2 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg2 ALTER COLUMN fid_vertice_id OPTIONS (
    column_name 'fid_vertice_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg2 ALTER COLUMN equipmentid OPTIONS (
    column_name 'equipmentid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg2 ALTER COLUMN equipmentname OPTIONS (
    column_name 'equipmentname'
);
ALTER FOREIGN TABLE strategy.business_distance_stg2 ALTER COLUMN equip_vertice_id OPTIONS (
    column_name 'equip_vertice_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg2 ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);


ALTER FOREIGN TABLE strategy.business_distance_stg2 OWNER TO postgres;

--
-- Name: business_distance_stg3; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.business_distance_stg3 (
    route_id bigint,
    fid character varying(20),
    fid_vertice_id bigint,
    equipmentid bigint,
    equipmentname character varying(255),
    equip_vertice_id bigint,
    distance double precision,
    seq integer,
    path_seq integer,
    node bigint,
    edge bigint,
    cost double precision,
    agg_cost double precision,
    the_geom public.geometry(MultiLineString,27700)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'business_distance_stg3'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN fid_vertice_id OPTIONS (
    column_name 'fid_vertice_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN equipmentid OPTIONS (
    column_name 'equipmentid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN equipmentname OPTIONS (
    column_name 'equipmentname'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN equip_vertice_id OPTIONS (
    column_name 'equip_vertice_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN distance OPTIONS (
    column_name 'distance'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN seq OPTIONS (
    column_name 'seq'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN path_seq OPTIONS (
    column_name 'path_seq'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN node OPTIONS (
    column_name 'node'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN edge OPTIONS (
    column_name 'edge'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN cost OPTIONS (
    column_name 'cost'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN agg_cost OPTIONS (
    column_name 'agg_cost'
);
ALTER FOREIGN TABLE strategy.business_distance_stg3 ALTER COLUMN the_geom OPTIONS (
    column_name 'the_geom'
);


ALTER FOREIGN TABLE strategy.business_distance_stg3 OWNER TO postgres;

--
-- Name: business_distance_stg4; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.business_distance_stg4 (
    route_id bigint,
    fid character varying(20),
    equipmentid bigint,
    route_distance double precision,
    geom public.geometry,
    route_rank bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'business_distance_stg4'
);
ALTER FOREIGN TABLE strategy.business_distance_stg4 ALTER COLUMN route_id OPTIONS (
    column_name 'route_id'
);
ALTER FOREIGN TABLE strategy.business_distance_stg4 ALTER COLUMN fid OPTIONS (
    column_name 'fid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg4 ALTER COLUMN equipmentid OPTIONS (
    column_name 'equipmentid'
);
ALTER FOREIGN TABLE strategy.business_distance_stg4 ALTER COLUMN route_distance OPTIONS (
    column_name 'route_distance'
);
ALTER FOREIGN TABLE strategy.business_distance_stg4 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.business_distance_stg4 ALTER COLUMN route_rank OPTIONS (
    column_name 'route_rank'
);


ALTER FOREIGN TABLE strategy.business_distance_stg4 OWNER TO postgres;

--
-- Name: cab_capacity_estimate; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.cab_capacity_estimate (
    sprn integer,
    premise_status smallint,
    cab_id bigint,
    cab_name character varying,
    cab_status integer
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'cab_capacity_estimate'
);
ALTER FOREIGN TABLE strategy.cab_capacity_estimate ALTER COLUMN sprn OPTIONS (
    column_name 'sprn'
);
ALTER FOREIGN TABLE strategy.cab_capacity_estimate ALTER COLUMN premise_status OPTIONS (
    column_name 'premise_status'
);
ALTER FOREIGN TABLE strategy.cab_capacity_estimate ALTER COLUMN cab_id OPTIONS (
    column_name 'cab_id'
);
ALTER FOREIGN TABLE strategy.cab_capacity_estimate ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.cab_capacity_estimate ALTER COLUMN cab_status OPTIONS (
    column_name 'cab_status'
);


ALTER FOREIGN TABLE strategy.cab_capacity_estimate OWNER TO postgres;

--
-- Name: cabs_combined; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.cabs_combined (
    id bigint NOT NULL,
    source text,
    type text,
    original_id bigint,
    name character varying,
    old_name text,
    new_name text,
    status bigint,
    live_date date,
    geom public.geometry(Point,27700),
    borough character varying(50)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'cabs_combined'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN source OPTIONS (
    column_name 'source'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN original_id OPTIONS (
    column_name 'original_id'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN old_name OPTIONS (
    column_name 'old_name'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN new_name OPTIONS (
    column_name 'new_name'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN live_date OPTIONS (
    column_name 'live_date'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.cabs_combined ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);


ALTER FOREIGN TABLE strategy.cabs_combined OWNER TO postgres;

--
-- Name: cabs_combined_old; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.cabs_combined_old (
    id bigint,
    source text,
    type text,
    original_id bigint,
    name character varying,
    old_name text,
    new_name text,
    status bigint,
    live_date date,
    geom public.geometry(Point,27700),
    borough character varying(50)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'cabs_combined_old'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN source OPTIONS (
    column_name 'source'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN original_id OPTIONS (
    column_name 'original_id'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN old_name OPTIONS (
    column_name 'old_name'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN new_name OPTIONS (
    column_name 'new_name'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN live_date OPTIONS (
    column_name 'live_date'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.cabs_combined_old ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);


ALTER FOREIGN TABLE strategy.cabs_combined_old OWNER TO postgres;

--
-- Name: cabs_combined_stg0; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.cabs_combined_stg0 (
    source text,
    type text,
    original_id integer,
    name character varying,
    old_name character varying,
    new_name text,
    status integer,
    live_date date,
    geom public.geometry(Point,27700),
    borough character varying(50)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'cabs_combined_stg0'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN source OPTIONS (
    column_name 'source'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN original_id OPTIONS (
    column_name 'original_id'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN old_name OPTIONS (
    column_name 'old_name'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN new_name OPTIONS (
    column_name 'new_name'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN live_date OPTIONS (
    column_name 'live_date'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.cabs_combined_stg0 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);


ALTER FOREIGN TABLE strategy.cabs_combined_stg0 OWNER TO postgres;

--
-- Name: cabs_pre_hld; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.cabs_pre_hld (
    id bigint NOT NULL,
    geom public.geometry(Point,27700),
    borough character varying(50),
    name character varying(20)
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'cabs_pre_hld'
);
ALTER FOREIGN TABLE strategy.cabs_pre_hld ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.cabs_pre_hld ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.cabs_pre_hld ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.cabs_pre_hld ALTER COLUMN name OPTIONS (
    column_name 'name'
);


ALTER FOREIGN TABLE strategy.cabs_pre_hld OWNER TO postgres;

--
-- Name: cabs_target; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.cabs_target (
    target_type text,
    id bigint,
    source text,
    type text,
    original_id bigint,
    name character varying,
    status integer,
    live_date date,
    geom public.geometry(Point,27700),
    borough character varying(22),
    ord integer,
    r bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'cabs_target'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN target_type OPTIONS (
    column_name 'target_type'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN source OPTIONS (
    column_name 'source'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN type OPTIONS (
    column_name 'type'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN original_id OPTIONS (
    column_name 'original_id'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN name OPTIONS (
    column_name 'name'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN status OPTIONS (
    column_name 'status'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN live_date OPTIONS (
    column_name 'live_date'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN ord OPTIONS (
    column_name 'ord'
);
ALTER FOREIGN TABLE strategy.cabs_target ALTER COLUMN r OPTIONS (
    column_name 'r'
);


ALTER FOREIGN TABLE strategy.cabs_target OWNER TO postgres;

--
-- Name: cluster_stg1; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.cluster_stg1 (
    uprn bigint,
    building_type text,
    building_premise_count bigint,
    borough character varying(22),
    ward character varying(70),
    geom public.geometry(Point,27700),
    r bigint
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'cluster_stg1'
);
ALTER FOREIGN TABLE strategy.cluster_stg1 ALTER COLUMN uprn OPTIONS (
    column_name 'uprn'
);
ALTER FOREIGN TABLE strategy.cluster_stg1 ALTER COLUMN building_type OPTIONS (
    column_name 'building_type'
);
ALTER FOREIGN TABLE strategy.cluster_stg1 ALTER COLUMN building_premise_count OPTIONS (
    column_name 'building_premise_count'
);
ALTER FOREIGN TABLE strategy.cluster_stg1 ALTER COLUMN borough OPTIONS (
    column_name 'borough'
);
ALTER FOREIGN TABLE strategy.cluster_stg1 ALTER COLUMN ward OPTIONS (
    column_name 'ward'
);
ALTER FOREIGN TABLE strategy.cluster_stg1 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.cluster_stg1 ALTER COLUMN r OPTIONS (
    column_name 'r'
);


ALTER FOREIGN TABLE strategy.cluster_stg1 OWNER TO postgres;

--
-- Name: clusters_sdu_plan_2023; Type: FOREIGN TABLE; Schema: strategy; Owner: postgres
--

CREATE FOREIGN TABLE strategy.clusters_sdu_plan_2023 (
    id_0 integer NOT NULL,
    geom public.geometry(MultiPolygon,27700),
    id bigint,
    cluster_ru bigint,
    cluster__1 character varying(24),
    cluster_id character varying(254),
    total_prem numeric,
    mdu_premis numeric,
    mdu_with_w numeric,
    mdu_with_1 numeric,
    mdu_with_2 numeric,
    sdu_premis numeric,
    mdu_buildi numeric,
    sdu_buildi numeric,
    pia_oh_pre numeric,
    pia_ug_pre numeric,
    civils_pre numeric,
    pia_oh_mdu numeric,
    pia_oh_sdu numeric,
    pia_ug_mdu numeric,
    pia_ug_sdu numeric,
    civils_mdu numeric,
    civils_sdu numeric,
    in_project numeric,
    released_p numeric,
    cab_name character varying(254),
    pole_dista numeric,
    duct_dista numeric,
    civils_dis numeric,
    total_dist numeric,
    cluster_ca numeric,
    mdu_low_ca numeric,
    sdu_low_ca numeric,
    capacity_l numeric,
    civils_low numeric,
    pia_ug_low numeric,
    pia_oh_low numeric,
    mdu_high_c numeric,
    sdu_high_c numeric,
    capacity_h numeric,
    civils_hig numeric,
    pia_ug_hig numeric,
    pia_oh_hig numeric,
    mdu_waylea numeric,
    capex_low numeric,
    cppp_low numeric,
    capex_high numeric,
    cppp_high numeric,
    cab_status bigint,
    cab_live_d date
)
SERVER geo_db
OPTIONS (
    schema_name 'strategy',
    table_name 'clusters_sdu_plan_2023'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN id_0 OPTIONS (
    column_name 'id_0'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN geom OPTIONS (
    column_name 'geom'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN id OPTIONS (
    column_name 'id'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cluster_ru OPTIONS (
    column_name 'cluster_ru'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cluster__1 OPTIONS (
    column_name 'cluster__1'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cluster_id OPTIONS (
    column_name 'cluster_id'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN total_prem OPTIONS (
    column_name 'total_prem'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_premis OPTIONS (
    column_name 'mdu_premis'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_with_w OPTIONS (
    column_name 'mdu_with_w'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_with_1 OPTIONS (
    column_name 'mdu_with_1'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_with_2 OPTIONS (
    column_name 'mdu_with_2'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN sdu_premis OPTIONS (
    column_name 'sdu_premis'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_buildi OPTIONS (
    column_name 'mdu_buildi'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN sdu_buildi OPTIONS (
    column_name 'sdu_buildi'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_oh_pre OPTIONS (
    column_name 'pia_oh_pre'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_ug_pre OPTIONS (
    column_name 'pia_ug_pre'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN civils_pre OPTIONS (
    column_name 'civils_pre'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_oh_mdu OPTIONS (
    column_name 'pia_oh_mdu'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_oh_sdu OPTIONS (
    column_name 'pia_oh_sdu'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_ug_mdu OPTIONS (
    column_name 'pia_ug_mdu'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_ug_sdu OPTIONS (
    column_name 'pia_ug_sdu'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN civils_mdu OPTIONS (
    column_name 'civils_mdu'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN civils_sdu OPTIONS (
    column_name 'civils_sdu'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN in_project OPTIONS (
    column_name 'in_project'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN released_p OPTIONS (
    column_name 'released_p'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cab_name OPTIONS (
    column_name 'cab_name'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pole_dista OPTIONS (
    column_name 'pole_dista'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN duct_dista OPTIONS (
    column_name 'duct_dista'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN civils_dis OPTIONS (
    column_name 'civils_dis'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN total_dist OPTIONS (
    column_name 'total_dist'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cluster_ca OPTIONS (
    column_name 'cluster_ca'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_low_ca OPTIONS (
    column_name 'mdu_low_ca'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN sdu_low_ca OPTIONS (
    column_name 'sdu_low_ca'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN capacity_l OPTIONS (
    column_name 'capacity_l'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN civils_low OPTIONS (
    column_name 'civils_low'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_ug_low OPTIONS (
    column_name 'pia_ug_low'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_oh_low OPTIONS (
    column_name 'pia_oh_low'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_high_c OPTIONS (
    column_name 'mdu_high_c'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN sdu_high_c OPTIONS (
    column_name 'sdu_high_c'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN capacity_h OPTIONS (
    column_name 'capacity_h'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN civils_hig OPTIONS (
    column_name 'civils_hig'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_ug_hig OPTIONS (
    column_name 'pia_ug_hig'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN pia_oh_hig OPTIONS (
    column_name 'pia_oh_hig'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN mdu_waylea OPTIONS (
    column_name 'mdu_waylea'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN capex_low OPTIONS (
    column_name 'capex_low'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cppp_low OPTIONS (
    column_name 'cppp_low'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN capex_high OPTIONS (
    column_name 'capex_high'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cppp_high OPTIONS (
    column_name 'cppp_high'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cab_status OPTIONS (
    column_name 'cab_status'
);
ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 ALTER COLUMN cab_live_d OPTIONS (
    column_name 'cab_live_d'
);


ALTER FOREIGN TABLE strategy.clusters_sdu_plan_2023 OWNER TO postgres;

--
-- Name: distance_analysis_data_1771968349_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771968349_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771968349_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771969624_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771969624_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771969624_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771969774_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771969774_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771969774_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771969925_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771969925_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771969925_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771970335_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771970335_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771970335_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771970480_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771970480_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771970480_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771970543_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771970543_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771970543_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771970571_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771970571_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771970571_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771976901_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771976901_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771976901_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771976913_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771976913_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771976913_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771976921_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771976921_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771976921_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1771976926_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1771976926_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1771976926_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772042116_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772042116_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772042116_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772142735_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772142735_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772142735_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772142901_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772142901_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772142901_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772143048_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772143048_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772143048_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772143691_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772143691_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772143691_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772143754_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772143754_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772143754_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772145347_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772145347_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772145347_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772203340_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772203340_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772203340_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772203393_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772203393_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772203393_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772203885_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772203885_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772203885_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772203955_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772203955_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772203955_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772204837_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772204837_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772204837_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772711197_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772711197_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772711197_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772711225_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772711225_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772711225_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1772711535_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1772711535_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1772711535_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1773049040_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1773049040_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1773049040_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1773049084_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1773049084_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1773049084_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1773049098_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1773049098_output (
    project_id integer,
    project_name character varying(150),
    project_status_desc character varying(100),
    project_manager character varying(100),
    account_name character varying(100),
    geom public.geometry,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1773049098_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1773138468_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1773138468_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1773138468_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1773138496_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1773138496_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1773138496_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1773138534_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1773138534_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1773138534_output OWNER TO postgres;

--
-- Name: distance_analysis_data_1773142025_output; Type: TABLE; Schema: strategy; Owner: postgres
--

CREATE TABLE strategy.distance_analysis_data_1773142025_output (
    stocklist_id integer,
    project_id integer,
    uprn bigint,
    classification_code character varying,
    class_description character varying,
    address text,
    postcode character varying(8),
    geom public.geometry(Point,27700),
    style_type text,
    stocklist_name character varying(500),
    account_id integer,
    account_name character varying(500),
    company_id integer,
    building_type text,
    building_use text,
    building_premises bigint,
    project_name character varying(500),
    toid character varying(50),
    rn bigint,
    temp_id bigint,
    target_1_column_1 text,
    target_1_column_2 text,
    target_1_column_3 text,
    target_1_distance double precision,
    target_1_calculated_heading_degrees double precision,
    target_2_column_1 text,
    target_2_column_2 text,
    target_2_column_3 text,
    target_2_distance double precision,
    target_2_calculated_heading_degrees double precision,
    target_3_column_1 text,
    target_3_column_2 text,
    target_3_column_3 text,
    target_3_distance double precision,
    target_3_calculated_heading_degrees double precision,
    t1_t2_similar_heading boolean,
    t1_t3_similar_heading boolean,
    t2_t3_similar_heading boolean,
    all_three_similar_heading boolean,
    aligned_datasets_count integer,
    target_matches_count integer,
    processed_datetime timestamp without time zone,
    last_id_processed integer
);


ALTER TABLE strategy.distance_analysis_data_1773142025_output OWNER TO postgres;

--
