     ON listing_changes.species_listing_id = species_listings.id
     LEFT JOIN geo_entities ON
     geo_entities.id = tmp_lc.party_id
-    LEFT JOIN geo_entity_types ON
-    geo_entity_types.id = geo_entities.geo_entity_type_id
     LEFT JOIN annotations ON
     annotations.id = listing_changes.annotation_id
     LEFT JOIN annotations hash_annotations ON

-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY trade_sandbox_template ALTER COLUMN id SET DEFAULT nextval('trade_sandbox_template_id_seq'::regclass);



    taxon_concept_id_syn integer,
    synonyms_ary character varying[],
    synonyms_author_years_ary character varying[],
    subspecies_not_listed_ary character varying[],
    countries_ids_ary integer[],
    all_distribution_iso_codes_ary character varying[],
    all_distribution_ary character varying[],
    native_distribution_ary character varying[],
    introduced_distribution_ary character varying[],
    introduced_uncertain_distribution_ary character varying[],
    reintroduced_distribution_ary character varying[],
    extinct_distribution_ary character varying[],
    extinct_uncertain_distribution_ary character varying[],
    uncertain_distribution_ary character varying[],
    all_distribution_ary_en character varying[],
    native_distribution_ary_en character varying[],
    introduced_distribution_ary_en character varying[],
    introduced_uncertain_distribution_ary_en character varying[],
    reintroduced_distribution_ary_en character varying[],
    extinct_distribution_ary_en character varying[],
    extinct_uncertain_distribution_ary_en character varying[],
    uncertain_distribution_ary_en character varying[],
    all_distribution_ary_es character varying[],
    native_distribution_ary_es character varying[],
    introduced_distribution_ary_es character varying[],
    introduced_uncertain_distribution_ary_es character varying[],
    reintroduced_distribution_ary_es character varying[],
    extinct_distribution_ary_es character varying[],
    extinct_uncertain_distribution_ary_es character varying[],
    uncertain_distribution_ary_es character varying[],
    all_distribution_ary_fr character varying[],
    native_distribution_ary_fr character varying[],
    introduced_distribution_ary_fr character varying[],
    introduced_uncertain_distribution_ary_fr character varying[],
    reintroduced_distribution_ary_fr character varying[],
    extinct_distribution_ary_fr character varying[],
    extinct_uncertain_distribution_ary_fr character varying[],
    uncertain_distribution_ary_fr character varying[],
    show_in_species_plus boolean,
    dirty boolean,
    expiry timestamp with time zone
);
