--
--


--
-- Name: stage_area; Type: DATABASE; Schema: -; Owner: administrador
--

CREATE DATABASE stage_area WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'es_VE.UTF-8' LC_CTYPE = 'es_VE.UTF-8';


ALTER DATABASE stage_area OWNER TO administrador;



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

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


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

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';





--
-- Name: beneficiarios; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE beneficiarios (
    rif character varying(10) DEFAULT NULL::character varying,
    pais character varying(200) NOT NULL,
    nombre character varying(100) NOT NULL,
    ventas bigint NOT NULL,
    ue_rif character varying(10) NOT NULL,
    anho_r integer NOT NULL,
    ciiu_principal character varying(13) NOT NULL,
    ue_tipo character varying(100) NOT NULL
);


ALTER TABLE public.beneficiarios OWNER TO administrador;

--
-- Name: beneficiarios_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE beneficiarios_diff (
    rif character varying(10) DEFAULT NULL::character varying,
    pais character varying(200) NOT NULL,
    nombre character varying(100) NOT NULL,
    ventas bigint NOT NULL,
    ue_rif character varying(10) NOT NULL,
    anho_r integer NOT NULL,
    ciiu_principal character varying(13) NOT NULL,
    ue_tipo character varying(100) NOT NULL
);


ALTER TABLE public.beneficiarios_diff OWNER TO administrador;

--
-- Name: bien_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE bien_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.bien_id_seq OWNER TO administrador;

--
-- Name: bien; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE bien (
    id integer DEFAULT nextval('bien_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    esp_tec text NOT NULL,
    codigo_aran character varying(13) NOT NULL,
    unidad_medida character varying(100) NOT NULL,
    peso double precision NOT NULL,
    planta_id integer NOT NULL,
    n_consumidores integer NOT NULL,
    marca character varying(100) DEFAULT NULL::character varying,
    cantidad_vendida bigint,
    cantidad_producida bigint,
    anyo integer,
    id_sigesic integer NOT NULL,
    monto_venta double precision
);


ALTER TABLE public.bien OWNER TO administrador;

--
-- Name: bien_comercializadonofabricado_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE bien_comercializadonofabricado_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.bien_comercializadonofabricado_id_seq OWNER TO administrador;

--
-- Name: bien_comercializadonofabricado; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE bien_comercializadonofabricado (
    id integer DEFAULT nextval('bien_comercializadonofabricado_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    marca character varying(100) NOT NULL,
    codigo_aran_id character varying(13) NOT NULL,
    esp_tec text NOT NULL,
    unidad_medida character varying(100) NOT NULL,
    nacional character(1) NOT NULL,
    peso double precision NOT NULL,
    ue_rif character varying(10) NOT NULL,
    cantidad bigint NOT NULL,
    anyo integer
);


ALTER TABLE public.bien_comercializadonofabricado OWNER TO administrador;

--
-- Name: bien_comercializadonofabricado_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE bien_comercializadonofabricado_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.bien_comercializadonofabricado_diff_id_seq OWNER TO administrador;

--
-- Name: bien_comercializadonofabricado_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE bien_comercializadonofabricado_diff (
    id integer DEFAULT nextval('bien_comercializadonofabricado_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    marca character varying(100) NOT NULL,
    codigo_aran_id character varying(13) NOT NULL,
    esp_tec text NOT NULL,
    unidad_medida character varying(100) NOT NULL,
    nacional character(1) NOT NULL,
    peso double precision NOT NULL,
    ue_rif character varying(10) NOT NULL,
    cantidad bigint NOT NULL,
    anyo integer
);


ALTER TABLE public.bien_comercializadonofabricado_diff OWNER TO administrador;

--
-- Name: bien_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE bien_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.bien_diff_id_seq OWNER TO administrador;

--
-- Name: bien_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE bien_diff (
    id integer DEFAULT nextval('bien_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    esp_tec text NOT NULL,
    codigo_aran character varying(13) NOT NULL,
    unidad_medida character varying(100) NOT NULL,
    peso double precision NOT NULL,
    planta_id integer NOT NULL,
    n_consumidores integer NOT NULL,
    marca character varying(100) DEFAULT NULL::character varying,
    cantidad_vendida bigint,
    cantidad_producida bigint,
    anyo integer,
    id_sigesic integer NOT NULL,
    monto_venta double precision
);


ALTER TABLE public.bien_diff OWNER TO administrador;

--
-- Name: cantempleadostercerizados_naturalezajuridica_ciiu_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantempleadostercerizados_naturalezajuridica_ciiu_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantempleadostercerizados_naturalezajuridica_ciiu_id_seq OWNER TO administrador;

--
-- Name: cantempleadostercerizados_naturalezajuridica_ciiu; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantempleadostercerizados_naturalezajuridica_ciiu (
    id integer DEFAULT nextval('cantempleadostercerizados_naturalezajuridica_ciiu_id_seq'::regclass) NOT NULL,
    naturalezajuridica character varying(150) NOT NULL,
    ciiu character varying(5) NOT NULL,
    cantidad_empleados_tercerizados integer NOT NULL,
    tipo_empresa character varying(70) NOT NULL
);


ALTER TABLE public.cantempleadostercerizados_naturalezajuridica_ciiu OWNER TO administrador;

--
-- Name: cantempleadostercerizados_naturalezajuridica_ciiu_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantempleadostercerizados_naturalezajuridica_ciiu_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantempleadostercerizados_naturalezajuridica_ciiu_diff_id_seq OWNER TO administrador;

--
-- Name: cantempleadostercerizados_naturalezajuridica_ciiu_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantempleadostercerizados_naturalezajuridica_ciiu_diff (
    id integer DEFAULT nextval('cantempleadostercerizados_naturalezajuridica_ciiu_diff_id_seq'::regclass) NOT NULL,
    naturalezajuridica character varying(150) NOT NULL,
    ciiu character varying(5) NOT NULL,
    cantidad_empleados_tercerizados integer NOT NULL,
    tipo_empresa character varying(70) NOT NULL
);


ALTER TABLE public.cantempleadostercerizados_naturalezajuridica_ciiu_diff OWNER TO administrador;

--
-- Name: cantidad_lineas_estaciones_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantidad_lineas_estaciones_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantidad_lineas_estaciones_id_seq OWNER TO administrador;

--
-- Name: cantidad_lineas_estaciones; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantidad_lineas_estaciones (
    id integer DEFAULT nextval('cantidad_lineas_estaciones_id_seq'::regclass) NOT NULL,
    rif text,
    cantidad_lineas_1 integer,
    cantidad_estaciones_1 integer,
    planta_id integer
);


ALTER TABLE public.cantidad_lineas_estaciones OWNER TO administrador;

--
-- Name: cantidad_lineas_estaciones_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantidad_lineas_estaciones_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantidad_lineas_estaciones_diff_id_seq OWNER TO administrador;

--
-- Name: cantidad_lineas_estaciones_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantidad_lineas_estaciones_diff (
    id integer DEFAULT nextval('cantidad_lineas_estaciones_diff_id_seq'::regclass) NOT NULL,
    rif text,
    cantidad_lineas_1 integer,
    cantidad_estaciones_1 integer,
    planta_id integer
);


ALTER TABLE public.cantidad_lineas_estaciones_diff OWNER TO administrador;

--
-- Name: cantturnos_municipio_tipoturno_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantturnos_municipio_tipoturno_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantturnos_municipio_tipoturno_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: cantturnos_municipio_tipoturno_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantturnos_municipio_tipoturno_tipoempresa (
    id integer DEFAULT nextval('cantturnos_municipio_tipoturno_tipoempresa_id_seq'::regclass) NOT NULL,
    ue_estado character varying(45) DEFAULT NULL::character varying,
    ue_municipio character varying(5) DEFAULT NULL::character varying,
    ue_tipo_empresa character varying(150) DEFAULT NULL::character varying,
    cantidad_ues integer,
    cantidad_turnos integer,
    ue_ciiu character varying(4),
    ue_tipo_turno character varying(50)
);


ALTER TABLE public.cantturnos_municipio_tipoturno_tipoempresa OWNER TO administrador;

--
-- Name: cantturnos_municipio_tipoturno_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantturnos_municipio_tipoturno_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantturnos_municipio_tipoturno_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: cantturnos_municipio_tipoturno_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantturnos_municipio_tipoturno_tipoempresa_diff (
    id integer DEFAULT nextval('cantturnos_municipio_tipoturno_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ue_ciiu integer,
    ue_estado character varying(45) DEFAULT NULL::character varying,
    ue_municipio character varying(5) DEFAULT NULL::character varying,
    ue_tipo_turno character varying(60) DEFAULT NULL::character varying,
    ue_tipo_empresa character varying(150) DEFAULT NULL::character varying,
    cantidad_ues integer,
    cantidad_turnos integer
);


ALTER TABLE public.cantturnos_municipio_tipoturno_tipoempresa_diff OWNER TO administrador;

--
-- Name: cantues_ciiuinsumo_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantues_ciiuinsumo_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantues_ciiuinsumo_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: cantues_ciiuinsumo_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantues_ciiuinsumo_tipoempresa (
    id integer DEFAULT nextval('cantues_ciiuinsumo_tipoempresa_id_seq'::regclass) NOT NULL,
    ciiu_insumo character varying(5) NOT NULL,
    tipo_empresa character varying(70) NOT NULL,
    cantidad_ues integer NOT NULL
);


ALTER TABLE public.cantues_ciiuinsumo_tipoempresa OWNER TO administrador;

--
-- Name: cantues_ciiuinsumo_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE cantues_ciiuinsumo_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.cantues_ciiuinsumo_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: cantues_ciiuinsumo_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantues_ciiuinsumo_tipoempresa_diff (
    id integer DEFAULT nextval('cantues_ciiuinsumo_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ciiu_insumo character varying(5) NOT NULL,
    tipo_empresa character varying(70) NOT NULL,
    cantidad_ues integer NOT NULL
);


ALTER TABLE public.cantues_ciiuinsumo_tipoempresa_diff OWNER TO administrador;

--
-- Name: cantues_ciiuproducto_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE cantues_ciiuproducto_tipoempresa (
    ciiu_producto character varying(5) NOT NULL,
    tipo_empresa character varying(70) NOT NULL,
    cantidad_ues integer NOT NULL
);


ALTER TABLE public.cantues_ciiuproducto_tipoempresa OWNER TO administrador;

--
-- Name: consumo_insumos_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumo_insumos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumo_insumos_id_seq OWNER TO administrador;

--
-- Name: consumo_insumos; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumo_insumos (
    id integer DEFAULT nextval('consumo_insumos_id_seq'::regclass) NOT NULL,
    insumo_id integer NOT NULL,
    anyo integer NOT NULL,
    cant_comp_nac double precision NOT NULL,
    cant_comp_imp double precision NOT NULL,
    cu_estimada_necesaria_actual double precision NOT NULL
);


ALTER TABLE public.consumo_insumos OWNER TO administrador;

--
-- Name: consumo_insumos_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumo_insumos_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumo_insumos_diff_id_seq OWNER TO administrador;

--
-- Name: consumo_insumos_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumo_insumos_diff (
    id integer DEFAULT nextval('consumo_insumos_diff_id_seq'::regclass) NOT NULL,
    insumo_id integer NOT NULL,
    anyo integer NOT NULL,
    cant_comp_nac double precision NOT NULL,
    cant_comp_imp double precision NOT NULL,
    cu_estimada_necesaria_actual double precision NOT NULL
);


ALTER TABLE public.consumo_insumos_diff OWNER TO administrador;

--
-- Name: consumoenerg_ciiu_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_ciiu_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_ciiu_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_ciiu_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_ciiu_tipoempresa (
    id integer DEFAULT nextval('consumoenerg_ciiu_tipoempresa_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    sede_consumo_agua double precision,
    sede_consumo_electrico double precision,
    sede_consumo_gas double precision,
    planta_consumo_agua double precision,
    planta_consumo_electrico double precision,
    planta_consumo_gas double precision,
    sucursal_consumo_agua double precision,
    sucursal_consumo_electrico double precision,
    sucursal_consumo_gas double precision,
    total_consumo_agua double precision,
    total_consumo_electrico double precision,
    total_consumo_gas double precision
);


ALTER TABLE public.consumoenerg_ciiu_tipoempresa OWNER TO administrador;

--
-- Name: consumoenerg_ciiu_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_ciiu_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_ciiu_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_ciiu_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_ciiu_tipoempresa_diff (
    id integer DEFAULT nextval('consumoenerg_ciiu_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    sede_consumo_agua double precision,
    sede_consumo_electrico double precision,
    sede_consumo_gas double precision,
    planta_consumo_agua double precision,
    planta_consumo_electrico double precision,
    planta_consumo_gas double precision,
    sucursal_consumo_agua double precision,
    sucursal_consumo_electrico double precision,
    sucursal_consumo_gas double precision,
    total_consumo_agua double precision,
    total_consumo_electrico double precision,
    total_consumo_gas double precision
);


ALTER TABLE public.consumoenerg_ciiu_tipoempresa_diff OWNER TO administrador;

--
-- Name: consumoenerg_planta_ciiu_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_planta_ciiu_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_planta_ciiu_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_planta_ciiu_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_planta_ciiu_tipoempresa (
    id integer DEFAULT nextval('consumoenerg_planta_ciiu_tipoempresa_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    consumo_agua double precision,
    consumo_electrico double precision,
    consumo_gas double precision
);


ALTER TABLE public.consumoenerg_planta_ciiu_tipoempresa OWNER TO administrador;

--
-- Name: consumoenerg_planta_ciiu_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_planta_ciiu_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_planta_ciiu_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_planta_ciiu_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_planta_ciiu_tipoempresa_diff (
    id integer DEFAULT nextval('consumoenerg_planta_ciiu_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    consumo_agua double precision,
    consumo_electrico double precision,
    consumo_gas double precision
);


ALTER TABLE public.consumoenerg_planta_ciiu_tipoempresa_diff OWNER TO administrador;

--
-- Name: consumoenerg_sedeprincipal_ciiu_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_sedeprincipal_ciiu_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_sedeprincipal_ciiu_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_sedeprincipal_ciiu_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_sedeprincipal_ciiu_tipoempresa (
    id integer DEFAULT nextval('consumoenerg_sedeprincipal_ciiu_tipoempresa_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    consumo_agua double precision,
    consumo_electrico double precision,
    consumo_gas double precision
);


ALTER TABLE public.consumoenerg_sedeprincipal_ciiu_tipoempresa OWNER TO administrador;

--
-- Name: consumoenerg_sedeprincipal_ciiu_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_sedeprincipal_ciiu_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_sedeprincipal_ciiu_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_sedeprincipal_ciiu_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_sedeprincipal_ciiu_tipoempresa_diff (
    id integer DEFAULT nextval('consumoenerg_sedeprincipal_ciiu_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    consumo_agua double precision,
    consumo_electrico double precision,
    consumo_gas double precision
);


ALTER TABLE public.consumoenerg_sedeprincipal_ciiu_tipoempresa_diff OWNER TO administrador;

--
-- Name: consumoenerg_sucursal_ciiu_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_sucursal_ciiu_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_sucursal_ciiu_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_sucursal_ciiu_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_sucursal_ciiu_tipoempresa (
    id integer DEFAULT nextval('consumoenerg_sucursal_ciiu_tipoempresa_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    consumo_agua double precision,
    consumo_electrico double precision,
    consumo_gas double precision
);


ALTER TABLE public.consumoenerg_sucursal_ciiu_tipoempresa OWNER TO administrador;

--
-- Name: consumoenerg_sucursal_ciiu_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE consumoenerg_sucursal_ciiu_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.consumoenerg_sucursal_ciiu_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: consumoenerg_sucursal_ciiu_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE consumoenerg_sucursal_ciiu_tipoempresa_diff (
    id integer DEFAULT nextval('consumoenerg_sucursal_ciiu_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ciiu character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(70) DEFAULT NULL::character varying,
    consumo_agua double precision,
    consumo_electrico double precision,
    consumo_gas double precision
);


ALTER TABLE public.consumoenerg_sucursal_ciiu_tipoempresa_diff OWNER TO administrador;

--
-- Name: correspondencia_codigoaran_ciiu; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE correspondencia_codigoaran_ciiu (
    codigo_arancelario character varying(13) NOT NULL,
    ciiu character varying(5) NOT NULL
);


ALTER TABLE public.correspondencia_codigoaran_ciiu OWNER TO administrador;

--
-- Name: edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: edadmaquinaria_ciiu_estadomaquinaria_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE edadmaquinaria_ciiu_estadomaquinaria_tipoempresa (
    id integer DEFAULT nextval('edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_id_seq'::regclass) NOT NULL,
    ue_ciiu character varying(5) NOT NULL,
    estado_maquinaria character varying(45) NOT NULL,
    tipo_empresa character varying(70) NOT NULL,
    sumatoria_edad integer,
    sumatoria_cantidad_maquinarias integer
);


ALTER TABLE public.edadmaquinaria_ciiu_estadomaquinaria_tipoempresa OWNER TO administrador;

--
-- Name: edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff (
    id integer DEFAULT nextval('edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ue_ciiu character varying(5) NOT NULL,
    estado_maquinaria character varying(45) NOT NULL,
    tipo_empresa character varying(70) NOT NULL,
    sumatoria_edad integer,
    sumatoria_cantidad_maquinarias integer
);


ALTER TABLE public.edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff OWNER TO administrador;

--
-- Name: hechos_aporteanual_ciiu_responsabilidadsocial; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_aporteanual_ciiu_responsabilidadsocial (
    id_ciiu integer NOT NULL,
    id_responsabilidadsocial smallint NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_aporte_anual double precision NOT NULL,
    medida_cantidad_ues integer DEFAULT 1 NOT NULL
);


ALTER TABLE public.hechos_aporteanual_ciiu_responsabilidadsocial OWNER TO administrador;

--
-- Name: hechos_cantidadproveedores_ciiu_municipio; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_cantidadproveedores_ciiu_municipio (
    id_ciiu integer NOT NULL,
    id_estado smallint NOT NULL,
    id_municipio smallint NOT NULL,
    id_tipoempresa smallint NOT NULL,
    medida_cantidad_proveedores integer NOT NULL
);


ALTER TABLE public.hechos_cantidadproveedores_ciiu_municipio OWNER TO administrador;

--
-- Name: hechos_cantidadues_ciiu_responsabilidadsocial; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_cantidadues_ciiu_responsabilidadsocial (
    id_ciiu integer NOT NULL,
    id_responsabilidadsocial smallint NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_total_empresas integer
);


ALTER TABLE public.hechos_cantidadues_ciiu_responsabilidadsocial OWNER TO administrador;

--
-- Name: hechos_cantplantasprod_autonomiaelect_ciiu_municipio_tipoempres; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_cantplantasprod_autonomiaelect_ciiu_municipio_tipoempres (
    id_ciiu integer NOT NULL,
    id_estado smallint NOT NULL,
    id_municipio smallint NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_cantidad_plantas_productivas integer NOT NULL
);


ALTER TABLE public.hechos_cantplantasprod_autonomiaelect_ciiu_municipio_tipoempres OWNER TO administrador;

--
-- Name: hechos_cantsedesadmin_ciiu_municipio_tipotenencia_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_cantsedesadmin_ciiu_municipio_tipotenencia_tipoempresa (
    id_ciiu integer NOT NULL,
    id_estado smallint NOT NULL,
    id_municipio smallint NOT NULL,
    id_tipo_tenencia smallint NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_total_sedes_administrativas integer NOT NULL
);


ALTER TABLE public.hechos_cantsedesadmin_ciiu_municipio_tipotenencia_tipoempresa OWNER TO administrador;

--
-- Name: hechos_distcapitalprom_naturalezajuridica_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_distcapitalprom_naturalezajuridica_tipoempresa (
    id_naturalezajuridica smallint NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_total_publico_nacional double precision NOT NULL,
    medida_total_publico_extranjero double precision,
    medida_total_privado_nacional double precision,
    medida_total_privado_extranjero double precision,
    medida_total_ues integer
);


ALTER TABLE public.hechos_distcapitalprom_naturalezajuridica_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalempresas_naturalezajuridica_ciiu_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalempresas_naturalezajuridica_ciiu_tipoempresa (
    id_ciiu integer NOT NULL,
    id_naturalezajuridica smallint NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_cantidad_empresas double precision NOT NULL
);


ALTER TABLE public.hechos_totalempresas_naturalezajuridica_ciiu_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalsedesplantas_ciiu_tipoactividad_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalsedesplantas_ciiu_tipoactividad_tipoempresa (
    id_ciiu integer NOT NULL,
    id_tipo_actividad smallint NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    id_tipo_subunidad smallint NOT NULL,
    medida_cantidad_subunidades integer NOT NULL
);


ALTER TABLE public.hechos_totalsedesplantas_ciiu_tipoactividad_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalsucursales_ciiu_municipio_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalsucursales_ciiu_municipio_tipoempresa (
    id_ciiu integer NOT NULL,
    id_estado smallint NOT NULL,
    id_municipio integer NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_cantidad_sucursales integer NOT NULL
);


ALTER TABLE public.hechos_totalsucursales_ciiu_municipio_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalues_ciiu_codigoarancelario; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalues_ciiu_codigoarancelario (
    id_ciiu integer NOT NULL,
    id_codigoarancelario integer NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_cantidad_empresas integer NOT NULL
);


ALTER TABLE public.hechos_totalues_ciiu_codigoarancelario OWNER TO administrador;

--
-- Name: hechos_totalues_ciiu_marcaproducida_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalues_ciiu_marcaproducida_tipoempresa (
    id_ciiu integer NOT NULL,
    id_tipo_empresa integer NOT NULL,
    id_marca integer NOT NULL,
    medida_cantidad_empresas integer NOT NULL
);


ALTER TABLE public.hechos_totalues_ciiu_marcaproducida_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalues_ciiu_municipio_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalues_ciiu_municipio_tipoempresa (
    id_ciiu integer NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    id_estado smallint NOT NULL,
    id_municipio smallint NOT NULL,
    medida_total_empresas integer NOT NULL
);


ALTER TABLE public.hechos_totalues_ciiu_municipio_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalues_ciiu_tipocombustible_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalues_ciiu_tipocombustible_tipoempresa (
    id_ciiu integer NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    id_tipo_combustible smallint NOT NULL,
    medida_cantidad_empresas bigint NOT NULL
);


ALTER TABLE public.hechos_totalues_ciiu_tipocombustible_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalues_servicio_ciiu_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalues_servicio_ciiu_tipoempresa (
    id_ciiu integer NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_cantidad_empresas_prestadorasservicio integer NOT NULL
);


ALTER TABLE public.hechos_totalues_servicio_ciiu_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totalues_usanmateriaprima_ciiu_codigoaran_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totalues_usanmateriaprima_ciiu_codigoaran_tipoempresa (
    id_ciiu integer NOT NULL,
    id_codigoarancelario integer NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_cantidad_empresas integer NOT NULL
);


ALTER TABLE public.hechos_totalues_usanmateriaprima_ciiu_codigoaran_tipoempresa OWNER TO administrador;

--
-- Name: hechos_totaluescomercializadoras_codigoarancelariobiennoproduci; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE hechos_totaluescomercializadoras_codigoarancelariobiennoproduci (
    id_codigoarancelario integer NOT NULL,
    id_tipo_empresa smallint NOT NULL,
    medida_cantidad_empresas_comercializadoras integer NOT NULL,
    id_tiempo integer
);


ALTER TABLE public.hechos_totaluescomercializadoras_codigoarancelariobiennoproduci OWNER TO administrador;

--
-- Name: insumo_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE insumo_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.insumo_id_seq OWNER TO administrador;

--
-- Name: insumo; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE insumo (
    id integer DEFAULT nextval('insumo_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    esp_tec text NOT NULL,
    codigo_aran character varying(13) NOT NULL,
    unidad_medida_id integer NOT NULL,
    peso double precision NOT NULL,
    planta_id integer NOT NULL,
    n_proveedores integer NOT NULL,
    marca character varying(100) DEFAULT NULL::character varying,
    id_sigesic integer NOT NULL
);


ALTER TABLE public.insumo OWNER TO administrador;

--
-- Name: insumo_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE insumo_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.insumo_diff_id_seq OWNER TO administrador;

--
-- Name: insumo_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE insumo_diff (
    id integer DEFAULT nextval('insumo_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    esp_tec text NOT NULL,
    codigo_aran character varying(13) NOT NULL,
    unidad_medida_id integer NOT NULL,
    peso double precision NOT NULL,
    planta_id integer NOT NULL,
    n_proveedores integer NOT NULL,
    marca character varying(100) DEFAULT NULL::character varying,
    id_sigesic integer NOT NULL
);


ALTER TABLE public.insumo_diff OWNER TO administrador;

--
-- Name: insumo_extra_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE insumo_extra_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.insumo_extra_id_seq OWNER TO administrador;

--
-- Name: insumo_extra; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE insumo_extra (
    id integer DEFAULT nextval('insumo_extra_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    esp_tec text NOT NULL,
    codigo_aran character varying(13) NOT NULL,
    unidad_medida integer,
    peso double precision,
    ue_rif character varying(11) NOT NULL,
    marca character varying(100) DEFAULT NULL::character varying,
    cant_comp_nac double precision NOT NULL,
    cant_comp_imp double precision NOT NULL,
    cu_estimada_necesaria_actual double precision NOT NULL,
    anyo integer NOT NULL,
    id_sigesic integer NOT NULL
);


ALTER TABLE public.insumo_extra OWNER TO administrador;

--
-- Name: insumo_extra_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE insumo_extra_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.insumo_extra_diff_id_seq OWNER TO administrador;

--
-- Name: insumo_extra_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE insumo_extra_diff (
    id integer DEFAULT nextval('insumo_extra_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    esp_tec text NOT NULL,
    codigo_aran character varying(13) NOT NULL,
    unidad_medida integer,
    peso double precision,
    ue_rif character varying(11) NOT NULL,
    marca character varying(100) DEFAULT NULL::character varying,
    cant_comp_nac double precision NOT NULL,
    cant_comp_imp double precision NOT NULL,
    cu_estimada_necesaria_actual double precision NOT NULL,
    anyo integer NOT NULL,
    id_sigesic integer NOT NULL
);


ALTER TABLE public.insumo_extra_diff OWNER TO administrador;

--
-- Name: maquinaria_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE maquinaria_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maquinaria_id_seq OWNER TO administrador;

--
-- Name: maquinaria; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE maquinaria (
    id integer DEFAULT nextval('maquinaria_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    descripcion character varying(200) NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    voltaje numeric(20,2) NOT NULL,
    potencia numeric(20,2) NOT NULL,
    litros_agua numeric(20,2) NOT NULL,
    tipo_combustible character varying(100) DEFAULT NULL::character varying,
    distribucion_componente_id integer NOT NULL,
    pais_id integer NOT NULL,
    anho_adq integer NOT NULL,
    anho_fabricacion integer NOT NULL,
    vida_util integer NOT NULL,
    estado_maq_id integer NOT NULL,
    planta_id integer NOT NULL,
    anho integer NOT NULL,
    fecha_insercion date NOT NULL,
    fecha_situacion date NOT NULL,
    cantidad integer NOT NULL
);


ALTER TABLE public.maquinaria OWNER TO administrador;

--
-- Name: maquinaria_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE maquinaria_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maquinaria_diff_id_seq OWNER TO administrador;

--
-- Name: maquinaria_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE maquinaria_diff (
    id integer DEFAULT nextval('maquinaria_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    descripcion character varying(200) NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    voltaje numeric(20,2) NOT NULL,
    potencia numeric(20,2) NOT NULL,
    litros_agua numeric(20,2) NOT NULL,
    tipo_combustible character varying(100) DEFAULT NULL::character varying,
    distribucion_componente_id integer NOT NULL,
    pais_id integer NOT NULL,
    anho_adq integer NOT NULL,
    anho_fabricacion integer NOT NULL,
    vida_util integer NOT NULL,
    estado_maq_id integer NOT NULL,
    planta_id integer NOT NULL,
    anho integer NOT NULL,
    fecha_insercion date NOT NULL,
    fecha_situacion date NOT NULL,
    cantidad integer NOT NULL
);


ALTER TABLE public.maquinaria_diff OWNER TO administrador;

--
-- Name: maquinaria_extra_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE maquinaria_extra_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maquinaria_extra_id_seq OWNER TO administrador;

--
-- Name: maquinaria_extra; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE maquinaria_extra (
    id integer DEFAULT nextval('maquinaria_extra_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    descripcion character varying(200) NOT NULL,
    anho_adq integer NOT NULL,
    anho_fabricacion integer NOT NULL,
    vida_util integer NOT NULL,
    estado_maquinaria character varying(200) NOT NULL,
    ue_rif character varying(13) NOT NULL,
    ue_ciiu character varying(20) NOT NULL,
    ue_planta character varying(200) NOT NULL,
    ue_ciudad_planta character varying(150) NOT NULL,
    ue_parroquia_planta character varying(6) NOT NULL,
    anho integer NOT NULL,
    cantidad integer NOT NULL,
    pais_origen character varying(200) DEFAULT NULL::character varying
);


ALTER TABLE public.maquinaria_extra OWNER TO administrador;

--
-- Name: maquinaria_extra_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE maquinaria_extra_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maquinaria_extra_diff_id_seq OWNER TO administrador;

--
-- Name: maquinaria_extra_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE maquinaria_extra_diff (
    id integer DEFAULT nextval('maquinaria_extra_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    descripcion character varying(200) NOT NULL,
    anho_adq integer NOT NULL,
    anho_fabricacion integer NOT NULL,
    vida_util integer NOT NULL,
    estado_maquinaria character varying(200) NOT NULL,
    ue_rif character varying(13) NOT NULL,
    ue_ciiu character varying(20) NOT NULL,
    ue_planta character varying(200) NOT NULL,
    ue_ciudad_planta character varying(150) NOT NULL,
    ue_parroquia_planta character varying(6) NOT NULL,
    anho integer NOT NULL,
    cantidad integer NOT NULL,
    pais_origen character varying(200) DEFAULT NULL::character varying
);


ALTER TABLE public.maquinaria_extra_diff OWNER TO administrador;

--
-- Name: marca; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE marca (
    nombre character varying(250) NOT NULL
);


ALTER TABLE public.marca OWNER TO administrador;

--
-- Name: marca_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE marca_diff (
    nombre character varying(250) NOT NULL
);


ALTER TABLE public.marca_diff OWNER TO administrador;

--
-- Name: personalocupado_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE personalocupado_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personalocupado_id_seq OWNER TO administrador;

--
-- Name: personalocupado; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE personalocupado (
    id integer DEFAULT nextval('personalocupado_id_seq'::regclass) NOT NULL,
    indirectos integer,
    turnos integer NOT NULL,
    horas_turnos integer NOT NULL,
    femeninosf integer NOT NULL,
    femeninosc integer NOT NULL,
    masculinof integer NOT NULL,
    masculinoc integer NOT NULL,
    administrativo integer NOT NULL,
    operativo integer NOT NULL,
    unidad_economica_rif character varying(10) NOT NULL,
    anyo integer NOT NULL,
    activo "char" DEFAULT NULL::character varying,
    tipo_turno character varying(50)
);


ALTER TABLE public.personalocupado OWNER TO administrador;

--
-- Name: personalocupado_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE personalocupado_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personalocupado_diff_id_seq OWNER TO administrador;

--
-- Name: personalocupado_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE personalocupado_diff (
    id integer DEFAULT nextval('personalocupado_diff_id_seq'::regclass) NOT NULL,
    indirectos integer,
    tipo_turno character varying(70) NOT NULL,
    turnos integer NOT NULL,
    horas_turnos integer NOT NULL,
    femeninosf integer NOT NULL,
    femeninosc integer NOT NULL,
    masculinof integer NOT NULL,
    masculinoc integer NOT NULL,
    administrativo integer NOT NULL,
    operativo integer NOT NULL,
    unidad_economica_rif character varying(10) NOT NULL,
    anyo integer NOT NULL,
    activo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.personalocupado_diff OWNER TO administrador;

--
-- Name: planta; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE planta (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(60) NOT NULL,
    dir2 character varying(60) NOT NULL,
    dir3 character varying(60) DEFAULT NULL::character varying,
    dir4 character varying(60) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric,
    tipo_tenencia character varying(45) DEFAULT NULL::character varying,
    municipio_codigo character varying(4) DEFAULT NULL::character varying,
    entidad_codigo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.planta OWNER TO administrador;

--
-- Name: planta_act; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE planta_act (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(60) NOT NULL,
    dir2 character varying(60) NOT NULL,
    dir3 character varying(60) DEFAULT NULL::character varying,
    dir4 character varying(60) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric,
    tipo_tenencia character varying(45) DEFAULT NULL::character varying,
    municipio_codigo character varying(4) DEFAULT NULL::character varying,
    entidad_codigo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.planta_act OWNER TO administrador;

--
-- Name: planta_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE planta_diff (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(60) NOT NULL,
    dir2 character varying(60) NOT NULL,
    dir3 character varying(60) DEFAULT NULL::character varying,
    dir4 character varying(60) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric,
    tipo_tenencia character varying(45) DEFAULT NULL::character varying,
    municipio_codigo character varying(4) DEFAULT NULL::character varying,
    entidad_codigo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.planta_diff OWNER TO administrador;

--
-- Name: proveedor_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE proveedor_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.proveedor_id_seq OWNER TO administrador;

--
-- Name: proveedor; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE proveedor (
    id integer DEFAULT nextval('proveedor_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    rif character varying(10) DEFAULT NULL::character varying,
    pais_origen character varying(150) DEFAULT NULL::character varying,
    pais_procedencia character varying(150) DEFAULT NULL::character varying,
    nacional character(1) NOT NULL,
    planta_id integer NOT NULL
);


ALTER TABLE public.proveedor OWNER TO administrador;

--
-- Name: proveedor_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE proveedor_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.proveedor_diff_id_seq OWNER TO administrador;

--
-- Name: proveedor_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE proveedor_diff (
    id integer DEFAULT nextval('proveedor_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    rif character varying(10) DEFAULT NULL::character varying,
    pais_origen character varying(150) DEFAULT NULL::character varying,
    pais_procedencia character varying(150) DEFAULT NULL::character varying,
    nacional character(1) NOT NULL,
    planta_id integer NOT NULL
);


ALTER TABLE public.proveedor_diff OWNER TO administrador;

--
-- Name: proveedor_extra_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE proveedor_extra_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.proveedor_extra_id_seq OWNER TO administrador;

--
-- Name: proveedor_extra; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE proveedor_extra (
    id integer DEFAULT nextval('proveedor_extra_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    rif character varying(10) DEFAULT NULL::character varying,
    pais_origen character varying(150) DEFAULT NULL::character varying,
    pais_procedencia character varying(150) DEFAULT NULL::character varying,
    nacional character(1) NOT NULL,
    planta_id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    ue_ciiu character varying(5) NOT NULL,
    ue_tipo character varying(150) NOT NULL,
    ue_estado character varying(50) NOT NULL,
    ue_municipio character varying(50) NOT NULL
);


ALTER TABLE public.proveedor_extra OWNER TO administrador;

--
-- Name: proveedor_extra_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE proveedor_extra_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.proveedor_extra_diff_id_seq OWNER TO administrador;

--
-- Name: proveedor_extra_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE proveedor_extra_diff (
    id integer DEFAULT nextval('proveedor_extra_diff_id_seq'::regclass) NOT NULL,
    nombre character varying(100) NOT NULL,
    rif character varying(10) DEFAULT NULL::character varying,
    pais_origen character varying(150) DEFAULT NULL::character varying,
    pais_procedencia character varying(150) DEFAULT NULL::character varying,
    nacional character(1) NOT NULL,
    planta_id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    ue_ciiu character varying(5) NOT NULL,
    ue_tipo character varying(150) NOT NULL,
    ue_estado character varying(50) NOT NULL,
    ue_municipio character varying(50) NOT NULL
);


ALTER TABLE public.proveedor_extra_diff OWNER TO administrador;

--
-- Name: proveedores_insumo_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE proveedores_insumo_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.proveedores_insumo_id_seq OWNER TO administrador;

--
-- Name: proveedores_insumo; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE proveedores_insumo (
    id integer DEFAULT nextval('proveedores_insumo_id_seq'::regclass) NOT NULL,
    comprado_r numeric(25,2) DEFAULT NULL::numeric,
    anho_r integer,
    cantidad_comprada_r numeric(25,2) DEFAULT NULL::numeric,
    unidad_id integer,
    insumo_id integer,
    nombre_insumo character varying(100) DEFAULT NULL::character varying,
    esp_tec_insumo text,
    codigo_aran_id character varying(13) DEFAULT NULL::character varying,
    unidad_medida_id integer,
    peso double precision,
    planta_id_id integer,
    n_proveedores integer,
    marca character varying(100) DEFAULT NULL::character varying,
    nombre_unidad_medida character varying(100) DEFAULT NULL::character varying,
    descripcion_unidad_medida character varying(100) DEFAULT NULL::character varying,
    proveedor_id integer,
    nombre_proveedor character varying(100) DEFAULT NULL::character varying,
    rif_proveedor character varying(10) DEFAULT NULL::character varying,
    pais_origen_id integer,
    pais_procedencia_id integer,
    nacionalidad_proveedor character(1) DEFAULT NULL::bpchar,
    nombre_pais character varying(100) DEFAULT NULL::character varying,
    rif_productor character varying(10) DEFAULT NULL::character varying,
    nombre_productor character varying(255) DEFAULT NULL::character varying,
    razon_social_productor character varying(255) DEFAULT NULL::character varying
);


ALTER TABLE public.proveedores_insumo OWNER TO administrador;

--
-- Name: proveedores_insumo_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE proveedores_insumo_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.proveedores_insumo_diff_id_seq OWNER TO administrador;

--
-- Name: proveedores_insumo_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE proveedores_insumo_diff (
    id integer DEFAULT nextval('proveedores_insumo_diff_id_seq'::regclass) NOT NULL,
    comprado_r numeric(25,2) DEFAULT NULL::numeric,
    anho_r integer,
    cantidad_comprada_r numeric(25,2) DEFAULT NULL::numeric,
    unidad_id integer,
    insumo_id integer,
    nombre_insumo character varying(100) DEFAULT NULL::character varying,
    esp_tec_insumo text,
    codigo_aran_id character varying(13) DEFAULT NULL::character varying,
    unidad_medida_id integer,
    peso double precision,
    planta_id_id integer,
    n_proveedores integer,
    marca character varying(100) DEFAULT NULL::character varying,
    nombre_unidad_medida character varying(100) DEFAULT NULL::character varying,
    descripcion_unidad_medida character varying(100) DEFAULT NULL::character varying,
    proveedor_id integer,
    nombre_proveedor character varying(100) DEFAULT NULL::character varying,
    rif_proveedor character varying(10) DEFAULT NULL::character varying,
    pais_origen_id integer,
    pais_procedencia_id integer,
    nacionalidad_proveedor character(1) DEFAULT NULL::bpchar,
    nombre_pais character varying(100) DEFAULT NULL::character varying,
    rif_productor character varying(10) DEFAULT NULL::character varying,
    nombre_productor character varying(255) DEFAULT NULL::character varying,
    razon_social_productor character varying(255) DEFAULT NULL::character varying
);


ALTER TABLE public.proveedores_insumo_diff OWNER TO administrador;

--
-- Name: razoncapitalsocialportrabajador_naturalezajuridica_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE razoncapitalsocialportrabajador_naturalezajuridica_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.razoncapitalsocialportrabajador_naturalezajuridica_id_seq OWNER TO administrador;

--
-- Name: razoncapitalsocialportrabajador_naturalezajuridica; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE razoncapitalsocialportrabajador_naturalezajuridica (
    id integer DEFAULT nextval('razoncapitalsocialportrabajador_naturalezajuridica_id_seq'::regclass) NOT NULL,
    naturalezajuridica character varying(150) NOT NULL,
    tipoempresa character varying(70) NOT NULL,
    sumatoria_capitalsocial double precision,
    sumatoria_trabajadores integer
);


ALTER TABLE public.razoncapitalsocialportrabajador_naturalezajuridica OWNER TO administrador;

--
-- Name: razoncapitalsocialportrabajador_naturalezajuridica_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE razoncapitalsocialportrabajador_naturalezajuridica_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.razoncapitalsocialportrabajador_naturalezajuridica_diff_id_seq OWNER TO administrador;

--
-- Name: razoncapitalsocialportrabajador_naturalezajuridica_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE razoncapitalsocialportrabajador_naturalezajuridica_diff (
    id integer DEFAULT nextval('razoncapitalsocialportrabajador_naturalezajuridica_diff_id_seq'::regclass) NOT NULL,
    naturalezajuridica character varying(150) NOT NULL,
    tipoempresa character varying(70) NOT NULL,
    sumatoria_capitalsocial double precision,
    sumatoria_trabajadores integer
);


ALTER TABLE public.razoncapitalsocialportrabajador_naturalezajuridica_diff OWNER TO administrador;

--
-- Name: registro_mercantil_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE registro_mercantil_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.registro_mercantil_id_seq OWNER TO administrador;

--
-- Name: registro_mercantil; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE registro_mercantil (
    id integer DEFAULT nextval('registro_mercantil_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    capital_social numeric(25,2) DEFAULT NULL::numeric,
    capital_pagado numeric(25,2) DEFAULT NULL::numeric,
    capital_contable numeric(25,2) DEFAULT NULL::numeric,
    naturalezajuridica character varying(150) DEFAULT NULL::character varying,
    dist_cap_publico_nacional double precision,
    dist_cap_privado_nacional double precision,
    dist_cap_publico_extranjero double precision,
    dist_cap_privado_extranjero double precision
);


ALTER TABLE public.registro_mercantil OWNER TO administrador;

--
-- Name: registro_mercantil_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE registro_mercantil_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.registro_mercantil_diff_id_seq OWNER TO administrador;

--
-- Name: registro_mercantil_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE registro_mercantil_diff (
    id integer DEFAULT nextval('registro_mercantil_diff_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    capital_social numeric(25,2) DEFAULT NULL::numeric,
    capital_pagado numeric(25,2) DEFAULT NULL::numeric,
    capital_contable numeric(25,2) DEFAULT NULL::numeric,
    naturalezajuridica character varying(150) DEFAULT NULL::character varying,
    dist_cap_publico_nacional double precision,
    dist_cap_privado_nacional double precision,
    dist_cap_publico_extranjero double precision,
    dist_cap_privado_extranjero double precision
);


ALTER TABLE public.registro_mercantil_diff OWNER TO administrador;

--
-- Name: representantelegal_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE representantelegal_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.representantelegal_id_seq OWNER TO administrador;

--
-- Name: representantelegal; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE representantelegal (
    id integer DEFAULT nextval('representantelegal_id_seq'::regclass) NOT NULL,
    rif character varying(10) NOT NULL,
    nacionalidad character(1) NOT NULL,
    unidad_economica_rif character varying(10) NOT NULL,
    nombre character varying(140) DEFAULT NULL::character varying,
    cargo character varying(50) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    email character varying(50) NOT NULL,
    fecha_insercion date NOT NULL
);


ALTER TABLE public.representantelegal OWNER TO administrador;

--
-- Name: representantelegal_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE representantelegal_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.representantelegal_diff_id_seq OWNER TO administrador;

--
-- Name: representantelegal_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE representantelegal_diff (
    id integer DEFAULT nextval('representantelegal_diff_id_seq'::regclass) NOT NULL,
    rif character varying(10) NOT NULL,
    nacionalidad character(1) NOT NULL,
    unidad_economica_rif character varying(10) NOT NULL,
    nombre character varying(140) DEFAULT NULL::character varying,
    cargo character varying(50) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    email character varying(50) NOT NULL,
    fecha_insercion date NOT NULL
);


ALTER TABLE public.representantelegal_diff OWNER TO administrador;

--
-- Name: responsabilidadsocial_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE responsabilidadsocial_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.responsabilidadsocial_id_seq OWNER TO administrador;

--
-- Name: responsabilidadsocial; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE responsabilidadsocial (
    id integer DEFAULT nextval('responsabilidadsocial_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) NOT NULL,
    responsabilidad character varying(45) NOT NULL,
    aporte_anual double precision,
    descripcion character varying(255) DEFAULT NULL::character varying,
    beneficiario character varying(45) DEFAULT NULL::character varying,
    otro_beneficiario character varying(100) DEFAULT NULL::character varying,
    ue_ciiu character varying(45) DEFAULT NULL::character varying,
    ue_tipo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.responsabilidadsocial OWNER TO administrador;

--
-- Name: responsabilidadsocial_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE responsabilidadsocial_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.responsabilidadsocial_diff_id_seq OWNER TO administrador;

--
-- Name: responsabilidadsocial_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE responsabilidadsocial_diff (
    id integer DEFAULT nextval('responsabilidadsocial_diff_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) NOT NULL,
    responsabilidad character varying(45) NOT NULL,
    aporte_anual double precision,
    descripcion character varying(255) DEFAULT NULL::character varying,
    beneficiario character varying(45) DEFAULT NULL::character varying,
    otro_beneficiario character varying(100) DEFAULT NULL::character varying,
    ue_ciiu character varying(45) DEFAULT NULL::character varying,
    ue_tipo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.responsabilidadsocial_diff OWNER TO administrador;

--
-- Name: sede_principal; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE sede_principal (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(60) NOT NULL,
    dir2 character varying(60) NOT NULL,
    dir3 character varying(60) DEFAULT NULL::character varying,
    dir4 character varying(60) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric,
    tipo_tenencia character varying(45) DEFAULT NULL::character varying,
    municipio_codigo character varying(4) DEFAULT NULL::character varying,
    entidad_codigo character varying(2) DEFAULT NULL::character varying
);


ALTER TABLE public.sede_principal OWNER TO administrador;

--
-- Name: sede_principal_act; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE sede_principal_act (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(60) NOT NULL,
    dir2 character varying(60) NOT NULL,
    dir3 character varying(60) DEFAULT NULL::character varying,
    dir4 character varying(60) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric,
    tipo_tenencia character varying(45) DEFAULT NULL::character varying,
    municipio_codigo character varying(4) DEFAULT NULL::character varying,
    entidad_codigo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.sede_principal_act OWNER TO administrador;

--
-- Name: sede_principal_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE sede_principal_diff (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(60) NOT NULL,
    dir2 character varying(60) NOT NULL,
    dir3 character varying(60) DEFAULT NULL::character varying,
    dir4 character varying(60) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric,
    tipo_tenencia character varying(45) DEFAULT NULL::character varying,
    municipio_codigo character varying(4) DEFAULT NULL::character varying,
    entidad_codigo character varying(45) DEFAULT NULL::character varying
);


ALTER TABLE public.sede_principal_diff OWNER TO administrador;

--
-- Name: servicio_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE servicio_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.servicio_id_seq OWNER TO administrador;

--
-- Name: servicio; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE servicio (
    id integer DEFAULT nextval('servicio_id_seq'::regclass) NOT NULL,
    descripcion character varying(200) NOT NULL,
    codigo_ciiu character varying(5) NOT NULL,
    ue_rif character varying(10) NOT NULL
);


ALTER TABLE public.servicio OWNER TO administrador;

--
-- Name: servicio_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE servicio_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.servicio_diff_id_seq OWNER TO administrador;

--
-- Name: servicio_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE servicio_diff (
    id integer DEFAULT nextval('servicio_diff_id_seq'::regclass) NOT NULL,
    descripcion character varying(200) NOT NULL,
    codigo_ciiu character varying(5) NOT NULL,
    ue_rif character varying(10) NOT NULL
);


ALTER TABLE public.servicio_diff OWNER TO administrador;

--
-- Name: similares_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE similares_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.similares_id_seq OWNER TO administrador;

--
-- Name: similares; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE similares (
    id integer DEFAULT nextval('similares_id_seq'::regclass) NOT NULL,
    rif character varying(10) DEFAULT NULL::character varying,
    pais character varying(200) NOT NULL,
    nombre character varying(100) NOT NULL,
    ue_rif character varying(10) NOT NULL,
    anho_r integer NOT NULL,
    ciiu_principal character varying(13) NOT NULL,
    ue_tipo character varying(100) NOT NULL
);


ALTER TABLE public.similares OWNER TO administrador;

--
-- Name: similares_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE similares_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.similares_diff_id_seq OWNER TO administrador;

--
-- Name: similares_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE similares_diff (
    id integer DEFAULT nextval('similares_diff_id_seq'::regclass) NOT NULL,
    rif character varying(10) DEFAULT NULL::character varying,
    pais character varying(200) NOT NULL,
    nombre character varying(100) NOT NULL,
    ue_rif character varying(10) NOT NULL,
    anho_r integer NOT NULL,
    ciiu_principal character varying(13) NOT NULL,
    ue_tipo character varying(100) NOT NULL
);


ALTER TABLE public.similares_diff OWNER TO administrador;

--
-- Name: socio_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE socio_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.socio_id_seq OWNER TO administrador;

--
-- Name: socio; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE socio (
    id integer DEFAULT nextval('socio_id_seq'::regclass) NOT NULL,
    rif character varying(30) DEFAULT NULL::character varying,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(140) NOT NULL,
    nacionalidad character varying(1) NOT NULL,
    tipo_persona_id integer NOT NULL,
    porcentaje double precision NOT NULL
);


ALTER TABLE public.socio OWNER TO administrador;

--
-- Name: socio_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE socio_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.socio_diff_id_seq OWNER TO administrador;

--
-- Name: socio_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE socio_diff (
    id integer DEFAULT nextval('socio_diff_id_seq'::regclass) NOT NULL,
    rif character varying(30) DEFAULT NULL::character varying,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(140) NOT NULL,
    nacionalidad character varying(1) NOT NULL,
    tipo_persona_id integer NOT NULL,
    porcentaje double precision NOT NULL
);


ALTER TABLE public.socio_diff OWNER TO administrador;

--
-- Name: sucursal; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE sucursal (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(54) NOT NULL,
    dir2 character varying(54) NOT NULL,
    dir3 character varying(54) DEFAULT NULL::character varying,
    dir4 character varying(54) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric
);


ALTER TABLE public.sucursal OWNER TO administrador;

--
-- Name: sucursal_act; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE sucursal_act (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(54) NOT NULL,
    dir2 character varying(54) NOT NULL,
    dir3 character varying(54) DEFAULT NULL::character varying,
    dir4 character varying(54) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric
);


ALTER TABLE public.sucursal_act OWNER TO administrador;

--
-- Name: sucursal_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE sucursal_diff (
    id integer NOT NULL,
    ue_rif character varying(10) NOT NULL,
    nombre character varying(100) NOT NULL,
    telefono character varying(20) NOT NULL,
    fax character varying(20) DEFAULT NULL::character varying,
    pag_web character varying(100) DEFAULT NULL::character varying,
    email character varying(75) DEFAULT NULL::character varying,
    ciudad character varying(100) NOT NULL,
    parroquia_codigo character varying(6) NOT NULL,
    tipo_tenencia_id integer NOT NULL,
    tenencia_otra character varying(100) DEFAULT NULL::character varying,
    m2_terreno double precision NOT NULL,
    m2_construccion double precision NOT NULL,
    tipo_ambito_industrial_id integer,
    ambito_industrial_otro character varying(100) DEFAULT NULL::character varying,
    autonomia_electrica smallint NOT NULL,
    dir1 character varying(54) NOT NULL,
    dir2 character varying(54) NOT NULL,
    dir3 character varying(54) DEFAULT NULL::character varying,
    dir4 character varying(54) NOT NULL,
    activo smallint NOT NULL,
    consumo_electrico numeric(20,2) NOT NULL,
    consumo_agua numeric(20,2) NOT NULL,
    consumo_gas numeric(20,2) NOT NULL,
    capacidad_utilizada numeric(20,2) DEFAULT NULL::numeric
);


ALTER TABLE public.sucursal_diff OWNER TO administrador;

--
-- Name: tipo_actividad_ad_sede_planta_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE tipo_actividad_ad_sede_planta_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tipo_actividad_ad_sede_planta_id_seq OWNER TO administrador;

--
-- Name: tipo_actividad_ad_sede_planta; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE tipo_actividad_ad_sede_planta (
    id integer DEFAULT nextval('tipo_actividad_ad_sede_planta_id_seq'::regclass) NOT NULL,
    subunidad_economica_id integer,
    tipo_actividad_id integer,
    nombre_actividad_ad character varying(60) DEFAULT NULL::character varying,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    tipo_subunidad character varying(2) DEFAULT NULL::character varying,
    parroquia_codigo character varying(6) DEFAULT NULL::character varying
);


ALTER TABLE public.tipo_actividad_ad_sede_planta OWNER TO administrador;

--
-- Name: tipo_actividad_ad_sede_planta_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE tipo_actividad_ad_sede_planta_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tipo_actividad_ad_sede_planta_diff_id_seq OWNER TO administrador;

--
-- Name: tipo_actividad_ad_sede_planta_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE tipo_actividad_ad_sede_planta_diff (
    id integer DEFAULT nextval('tipo_actividad_ad_sede_planta_diff_id_seq'::regclass) NOT NULL,
    subunidad_economica_id integer,
    tipo_actividad_id integer,
    nombre_actividad_ad character varying(60) DEFAULT NULL::character varying,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    tipo_subunidad character varying(2) DEFAULT NULL::character varying,
    parroquia_codigo character varying(6) DEFAULT NULL::character varying
);


ALTER TABLE public.tipo_actividad_ad_sede_planta_diff OWNER TO administrador;

--
-- Name: tipo_ambito; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE tipo_ambito (
    id integer NOT NULL,
    nombre character varying(60) DEFAULT NULL::character varying
);


ALTER TABLE public.tipo_ambito OWNER TO administrador;

--
-- Name: tipo_combustible_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE tipo_combustible_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tipo_combustible_id_seq OWNER TO administrador;

--
-- Name: tipo_combustible; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE tipo_combustible (
    id integer DEFAULT nextval('tipo_combustible_id_seq'::regclass) NOT NULL,
    tipo_combustible character varying(100) NOT NULL
);


ALTER TABLE public.tipo_combustible OWNER TO administrador;

--
-- Name: tipo_combustible_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE tipo_combustible_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tipo_combustible_diff_id_seq OWNER TO administrador;

--
-- Name: tipo_combustible_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE tipo_combustible_diff (
    id integer DEFAULT nextval('tipo_combustible_diff_id_seq'::regclass) NOT NULL,
    tipo_combustible character varying(100) NOT NULL
);


ALTER TABLE public.tipo_combustible_diff OWNER TO administrador;

--
-- Name: tipo_tenencia; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE tipo_tenencia (
    id integer NOT NULL,
    nombre character varying(60) DEFAULT NULL::character varying
);


ALTER TABLE public.tipo_tenencia OWNER TO administrador;

--
-- Name: traduccion_dir; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE traduccion_dir (
    letra character(1) NOT NULL,
    traduccion character varying(100) DEFAULT NULL::character varying
);


ALTER TABLE public.traduccion_dir OWNER TO administrador;

--
-- Name: ue_ciiu_ambito_tipoempresa_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ue_ciiu_ambito_tipoempresa_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ue_ciiu_ambito_tipoempresa_id_seq OWNER TO administrador;

--
-- Name: ue_ciiu_ambito_tipoempresa; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ue_ciiu_ambito_tipoempresa (
    id integer DEFAULT nextval('ue_ciiu_ambito_tipoempresa_id_seq'::regclass) NOT NULL,
    ue_ciiu character varying(5) NOT NULL,
    ue_ambito character varying(60) NOT NULL,
    ue_tipo_empresa character varying(150) DEFAULT NULL::character varying,
    cantidad_ues integer
);


ALTER TABLE public.ue_ciiu_ambito_tipoempresa OWNER TO administrador;

--
-- Name: ue_ciiu_ambito_tipoempresa_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ue_ciiu_ambito_tipoempresa_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ue_ciiu_ambito_tipoempresa_diff_id_seq OWNER TO administrador;

--
-- Name: ue_ciiu_ambito_tipoempresa_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ue_ciiu_ambito_tipoempresa_diff (
    id integer DEFAULT nextval('ue_ciiu_ambito_tipoempresa_diff_id_seq'::regclass) NOT NULL,
    ue_ciiu character varying(5) NOT NULL,
    ue_ambito character varying(60) NOT NULL,
    ue_tipo_empresa character varying(150) DEFAULT NULL::character varying,
    cantidad_ues integer
);


ALTER TABLE public.ue_ciiu_ambito_tipoempresa_diff OWNER TO administrador;

--
-- Name: ue_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ue_diff (
    rif character varying(10),
    nombre character varying(255),
    personal_indirecto double precision,
    personal_femenino_contratado double precision,
    personal_femenino_fijo double precision,
    personal_masculino_contratado double precision,
    personal_masculino_fijo double precision,
    tipo_empresa text,
    ciiu_principal character varying(5),
    personal_administrativo double precision,
    personal_operativo double precision,
    razon_social character varying(255)
);


ALTER TABLE public.ue_diff OWNER TO administrador;

--
-- Name: ue_full; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ue_full (
    rif character varying(10),
    nombre character varying(255),
    personal_femenino_contratado double precision,
    personal_femenino_fijo double precision,
    personal_masculino_contratado double precision,
    personal_masculino_fijo double precision,
    tipo_empresa text,
    ciiu_principal character varying(5),
    personal_indirecto double precision,
    personal_administrativo double precision,
    personal_operativo double precision,
    razon_social character varying(255)
);


ALTER TABLE public.ue_full OWNER TO administrador;

--
-- Name: ues_competidoras_y_productos_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_competidoras_y_productos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_competidoras_y_productos_id_seq OWNER TO administrador;

--
-- Name: ues_competidoras_y_productos; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_competidoras_y_productos (
    id integer DEFAULT nextval('ues_competidoras_y_productos_id_seq'::regclass) NOT NULL,
    nombre_competidora character varying(100) DEFAULT NULL::character varying,
    rif_competidora character varying(10) DEFAULT NULL::character varying,
    desc_prod_competidor text,
    unidad_economica_rif character varying(10) DEFAULT NULL::character varying,
    anho_r integer,
    nombre_pais character varying(100) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_competidoras_y_productos OWNER TO administrador;

--
-- Name: ues_competidoras_y_productos_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_competidoras_y_productos_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_competidoras_y_productos_diff_id_seq OWNER TO administrador;

--
-- Name: ues_competidoras_y_productos_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_competidoras_y_productos_diff (
    id integer DEFAULT nextval('ues_competidoras_y_productos_diff_id_seq'::regclass) NOT NULL,
    nombre_competidora character varying(100) DEFAULT NULL::character varying,
    rif_competidora character varying(10) DEFAULT NULL::character varying,
    desc_prod_competidor text,
    unidad_economica_rif character varying(10) DEFAULT NULL::character varying,
    anho_r integer,
    nombre_pais character varying(100) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_competidoras_y_productos_diff OWNER TO administrador;

--
-- Name: ues_marcaproducida_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_marcaproducida_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_marcaproducida_id_seq OWNER TO administrador;

--
-- Name: ues_marcaproducida; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_marcaproducida (
    id integer DEFAULT nextval('ues_marcaproducida_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    marca text,
    ciiu_principal character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(150) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_marcaproducida OWNER TO administrador;

--
-- Name: ues_marcaproducida_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_marcaproducida_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_marcaproducida_diff_id_seq OWNER TO administrador;

--
-- Name: ues_marcaproducida_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_marcaproducida_diff (
    id integer DEFAULT nextval('ues_marcaproducida_diff_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    marca text,
    ciiu_principal character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(150) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_marcaproducida_diff OWNER TO administrador;

--
-- Name: ues_marcautilizada_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_marcautilizada_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_marcautilizada_id_seq OWNER TO administrador;

--
-- Name: ues_marcautilizada; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_marcautilizada (
    id integer DEFAULT nextval('ues_marcautilizada_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    marca text,
    ciiu_principal character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(150) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_marcautilizada OWNER TO administrador;

--
-- Name: ues_marcautilizada_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_marcautilizada_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_marcautilizada_diff_id_seq OWNER TO administrador;

--
-- Name: ues_marcautilizada_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_marcautilizada_diff (
    id integer DEFAULT nextval('ues_marcautilizada_diff_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    marca text,
    ciiu_principal character varying(5) DEFAULT NULL::character varying,
    tipo_empresa character varying(150) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_marcautilizada_diff OWNER TO administrador;

--
-- Name: ues_parroquia_representantelegal_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_parroquia_representantelegal_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_parroquia_representantelegal_id_seq OWNER TO administrador;

--
-- Name: ues_parroquia_representantelegal; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_parroquia_representantelegal (
    id integer DEFAULT nextval('ues_parroquia_representantelegal_id_seq'::regclass) NOT NULL,
    rif_representante character varying(10) NOT NULL,
    ue_rif character varying(10) NOT NULL,
    ue_razon_social character varying(255) NOT NULL,
    se_estado character varying(50) NOT NULL,
    se_municipio character varying(50) NOT NULL,
    se_parroquia character varying(80) NOT NULL,
    se_direccion character varying(316) NOT NULL,
    se_telefono character varying(20) NOT NULL,
    se_email character varying(75) DEFAULT NULL::character varying,
    nombre_representante character varying(140) DEFAULT NULL::character varying,
    cargo_representante character varying(50) NOT NULL,
    telefono_representante character varying(20) NOT NULL,
    email_representante character varying(50) NOT NULL
);


ALTER TABLE public.ues_parroquia_representantelegal OWNER TO administrador;

--
-- Name: ues_parroquia_representantelegal_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_parroquia_representantelegal_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_parroquia_representantelegal_diff_id_seq OWNER TO administrador;

--
-- Name: ues_parroquia_representantelegal_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_parroquia_representantelegal_diff (
    id integer DEFAULT nextval('ues_parroquia_representantelegal_diff_id_seq'::regclass) NOT NULL,
    rif_representante character varying(10) NOT NULL,
    ue_rif character varying(10) NOT NULL,
    ue_razon_social character varying(255) NOT NULL,
    se_estado character varying(50) NOT NULL,
    se_municipio character varying(50) NOT NULL,
    se_parroquia character varying(80) NOT NULL,
    se_direccion character varying(316) NOT NULL,
    se_telefono character varying(20) NOT NULL,
    se_email character varying(75) DEFAULT NULL::character varying,
    nombre_representante character varying(140) DEFAULT NULL::character varying,
    cargo_representante character varying(50) NOT NULL,
    telefono_representante character varying(20) NOT NULL,
    email_representante character varying(50) NOT NULL
);


ALTER TABLE public.ues_parroquia_representantelegal_diff OWNER TO administrador;

--
-- Name: ues_parroquia_socio_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_parroquia_socio_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_parroquia_socio_id_seq OWNER TO administrador;

--
-- Name: ues_parroquia_socio; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_parroquia_socio (
    id integer DEFAULT nextval('ues_parroquia_socio_id_seq'::regclass) NOT NULL,
    rif_pasaporte_socio character varying(30) DEFAULT NULL::character varying,
    ue_rif character varying(10) NOT NULL,
    ue_razon_social character varying(255) NOT NULL,
    se_estado character varying(50) NOT NULL,
    se_municipio character varying(50) NOT NULL,
    se_parroquia character varying(80) NOT NULL,
    se_direccion character varying(316) NOT NULL,
    se_telefono character varying(20) NOT NULL,
    se_email character varying(75) DEFAULT NULL::character varying,
    nombre_socio character varying(140) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_parroquia_socio OWNER TO administrador;

--
-- Name: ues_parroquia_socio_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_parroquia_socio_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_parroquia_socio_diff_id_seq OWNER TO administrador;

--
-- Name: ues_parroquia_socio_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_parroquia_socio_diff (
    id integer DEFAULT nextval('ues_parroquia_socio_diff_id_seq'::regclass) NOT NULL,
    rif_pasaporte_socio character varying(30) DEFAULT NULL::character varying,
    ue_rif character varying(10) NOT NULL,
    ue_razon_social character varying(255) NOT NULL,
    se_estado character varying(50) NOT NULL,
    se_municipio character varying(50) NOT NULL,
    se_parroquia character varying(80) NOT NULL,
    se_direccion character varying(316) NOT NULL,
    se_telefono character varying(20) NOT NULL,
    se_email character varying(75) DEFAULT NULL::character varying,
    nombre_socio character varying(140) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_parroquia_socio_diff OWNER TO administrador;

--
-- Name: ues_procesoproductivo_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_procesoproductivo_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_procesoproductivo_id_seq OWNER TO administrador;

--
-- Name: ues_procesoproductivo; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_procesoproductivo (
    id integer DEFAULT nextval('ues_procesoproductivo_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    componente integer,
    rif character varying(10) DEFAULT NULL::character varying,
    tipo_empresa character varying(150) DEFAULT NULL::character varying,
    ciiu_principal character varying(5) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_procesoproductivo OWNER TO administrador;

--
-- Name: ues_procesoproductivo_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_procesoproductivo_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_procesoproductivo_diff_id_seq OWNER TO administrador;

--
-- Name: ues_procesoproductivo_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_procesoproductivo_diff (
    id integer DEFAULT nextval('ues_procesoproductivo_diff_id_seq'::regclass) NOT NULL,
    ue_rif character varying(10) DEFAULT NULL::character varying,
    componente integer,
    rif character varying(10) DEFAULT NULL::character varying,
    tipo_empresa character varying(150) DEFAULT NULL::character varying,
    ciiu_principal character varying(5) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_procesoproductivo_diff OWNER TO administrador;

--
-- Name: ues_tipo_combustible_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_tipo_combustible_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_tipo_combustible_id_seq OWNER TO administrador;

--
-- Name: ues_tipo_combustible; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_tipo_combustible (
    id integer DEFAULT nextval('ues_tipo_combustible_id_seq'::regclass) NOT NULL,
    tipo_combustible_2 text,
    ue_rif character varying(10) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_tipo_combustible OWNER TO administrador;

--
-- Name: ues_tipo_combustible_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE ues_tipo_combustible_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ues_tipo_combustible_diff_id_seq OWNER TO administrador;

--
-- Name: ues_tipo_combustible_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE ues_tipo_combustible_diff (
    id integer DEFAULT nextval('ues_tipo_combustible_diff_id_seq'::regclass) NOT NULL,
    tipo_combustible_2 text,
    ue_rif character varying(10) DEFAULT NULL::character varying
);


ALTER TABLE public.ues_tipo_combustible_diff OWNER TO administrador;

--
-- Name: unidadecon_bien_venta; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE unidadecon_bien_venta (
    id integer NOT NULL,
    nombre character varying(100) NOT NULL,
    marca character varying(100) NOT NULL,
    codigo_aran_id character varying(13) NOT NULL,
    esp_tec text NOT NULL,
    unidad_medida_id integer NOT NULL,
    nacional smallint NOT NULL,
    peso double precision NOT NULL,
    ue_rif character varying(10) NOT NULL
);


ALTER TABLE public.unidadecon_bien_venta OWNER TO administrador;

--
-- Name: unidadmedida_diff_id_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

CREATE SEQUENCE unidadmedida_diff_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.unidadmedida_diff_id_seq OWNER TO administrador;

--
-- Name: unidadmedida_diff; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE unidadmedida_diff (
    id integer DEFAULT nextval('unidadmedida_diff_id_seq'::regclass) NOT NULL,
    unidad character varying(100) NOT NULL,
    descripcion character varying(100) NOT NULL
);


ALTER TABLE public.unidadmedida_diff OWNER TO administrador;

--
-- Name: bien_comercializadonofabricado_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY bien_comercializadonofabricado_diff
    ADD CONSTRAINT bien_comercializadonofabricado_diff_pkey PRIMARY KEY (id);


--
-- Name: bien_comercializadonofabricado_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY bien_comercializadonofabricado
    ADD CONSTRAINT bien_comercializadonofabricado_pkey PRIMARY KEY (id);


--
-- Name: bien_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY bien_diff
    ADD CONSTRAINT bien_diff_pkey PRIMARY KEY (id);


--
-- Name: bien_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY bien
    ADD CONSTRAINT bien_pkey PRIMARY KEY (id);


--
-- Name: cantempleadostercerizados_naturalezajuridica_ciiu_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantempleadostercerizados_naturalezajuridica_ciiu_diff
    ADD CONSTRAINT cantempleadostercerizados_naturalezajuridica_ciiu_diff_pkey PRIMARY KEY (id);


--
-- Name: cantempleadostercerizados_naturalezajuridica_ciiu_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantempleadostercerizados_naturalezajuridica_ciiu
    ADD CONSTRAINT cantempleadostercerizados_naturalezajuridica_ciiu_pkey PRIMARY KEY (id);


--
-- Name: cantidad_lineas_estaciones_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantidad_lineas_estaciones_diff
    ADD CONSTRAINT cantidad_lineas_estaciones_diff_pkey PRIMARY KEY (id);


--
-- Name: cantidad_lineas_estaciones_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantidad_lineas_estaciones
    ADD CONSTRAINT cantidad_lineas_estaciones_pkey PRIMARY KEY (id);


--
-- Name: cantturnos_municipio_tipoturno_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantturnos_municipio_tipoturno_tipoempresa_diff
    ADD CONSTRAINT cantturnos_municipio_tipoturno_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: cantturnos_municipio_tipoturno_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantturnos_municipio_tipoturno_tipoempresa
    ADD CONSTRAINT cantturnos_municipio_tipoturno_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: cantues_ciiuinsumo_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantues_ciiuinsumo_tipoempresa_diff
    ADD CONSTRAINT cantues_ciiuinsumo_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: cantues_ciiuinsumo_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY cantues_ciiuinsumo_tipoempresa
    ADD CONSTRAINT cantues_ciiuinsumo_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: consumo_insumos_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumo_insumos_diff
    ADD CONSTRAINT consumo_insumos_diff_pkey PRIMARY KEY (id);


--
-- Name: consumo_insumos_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumo_insumos
    ADD CONSTRAINT consumo_insumos_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_ciiu_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_ciiu_tipoempresa_diff
    ADD CONSTRAINT consumoenerg_ciiu_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_ciiu_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_ciiu_tipoempresa
    ADD CONSTRAINT consumoenerg_ciiu_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_planta_ciiu_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_planta_ciiu_tipoempresa_diff
    ADD CONSTRAINT consumoenerg_planta_ciiu_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_planta_ciiu_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_planta_ciiu_tipoempresa
    ADD CONSTRAINT consumoenerg_planta_ciiu_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_sedeprincipal_ciiu_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_sedeprincipal_ciiu_tipoempresa_diff
    ADD CONSTRAINT consumoenerg_sedeprincipal_ciiu_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_sedeprincipal_ciiu_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_sedeprincipal_ciiu_tipoempresa
    ADD CONSTRAINT consumoenerg_sedeprincipal_ciiu_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_sucursal_ciiu_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_sucursal_ciiu_tipoempresa_diff
    ADD CONSTRAINT consumoenerg_sucursal_ciiu_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: consumoenerg_sucursal_ciiu_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY consumoenerg_sucursal_ciiu_tipoempresa
    ADD CONSTRAINT consumoenerg_sucursal_ciiu_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff
    ADD CONSTRAINT edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY edadmaquinaria_ciiu_estadomaquinaria_tipoempresa
    ADD CONSTRAINT edadmaquinaria_ciiu_estadomaquinaria_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: insumo_diff_id_sigesic_key; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY insumo_diff
    ADD CONSTRAINT insumo_diff_id_sigesic_key UNIQUE (id_sigesic);


--
-- Name: insumo_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY insumo_diff
    ADD CONSTRAINT insumo_diff_pkey PRIMARY KEY (id);


--
-- Name: insumo_extra_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY insumo_extra_diff
    ADD CONSTRAINT insumo_extra_diff_pkey PRIMARY KEY (id);


--
-- Name: insumo_extra_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY insumo_extra
    ADD CONSTRAINT insumo_extra_pkey PRIMARY KEY (id);


--
-- Name: insumo_id_sigesic_key; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY insumo
    ADD CONSTRAINT insumo_id_sigesic_key UNIQUE (id_sigesic);


--
-- Name: insumo_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY insumo
    ADD CONSTRAINT insumo_pkey PRIMARY KEY (id);


--
-- Name: maquinaria_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY maquinaria_diff
    ADD CONSTRAINT maquinaria_diff_pkey PRIMARY KEY (id);


--
-- Name: maquinaria_extra_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY maquinaria_extra_diff
    ADD CONSTRAINT maquinaria_extra_diff_pkey PRIMARY KEY (id);


--
-- Name: maquinaria_extra_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY maquinaria_extra
    ADD CONSTRAINT maquinaria_extra_pkey PRIMARY KEY (id);


--
-- Name: maquinaria_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY maquinaria
    ADD CONSTRAINT maquinaria_pkey PRIMARY KEY (id);


--
-- Name: marca_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY marca_diff
    ADD CONSTRAINT marca_diff_pkey PRIMARY KEY (nombre);


--
-- Name: marca_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY marca
    ADD CONSTRAINT marca_pkey PRIMARY KEY (nombre);


--
-- Name: personalocupado_diff_id_key; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY personalocupado_diff
    ADD CONSTRAINT personalocupado_diff_id_key UNIQUE (id);


--
-- Name: personalocupado_id_key; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY personalocupado
    ADD CONSTRAINT personalocupado_id_key UNIQUE (id);


--
-- Name: planta_act_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY planta_act
    ADD CONSTRAINT planta_act_pkey PRIMARY KEY (id);


--
-- Name: planta_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY planta_diff
    ADD CONSTRAINT planta_diff_pkey PRIMARY KEY (id);


--
-- Name: planta_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY planta
    ADD CONSTRAINT planta_pkey PRIMARY KEY (id);


--
-- Name: proveedor_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY proveedor_diff
    ADD CONSTRAINT proveedor_diff_pkey PRIMARY KEY (id);


--
-- Name: proveedor_extra_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY proveedor_extra_diff
    ADD CONSTRAINT proveedor_extra_diff_pkey PRIMARY KEY (id);


--
-- Name: proveedor_extra_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY proveedor_extra
    ADD CONSTRAINT proveedor_extra_pkey PRIMARY KEY (id);


--
-- Name: proveedor_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY proveedor
    ADD CONSTRAINT proveedor_pkey PRIMARY KEY (id);


--
-- Name: proveedores_insumo_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY proveedores_insumo_diff
    ADD CONSTRAINT proveedores_insumo_diff_pkey PRIMARY KEY (id);


--
-- Name: proveedores_insumo_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY proveedores_insumo
    ADD CONSTRAINT proveedores_insumo_pkey PRIMARY KEY (id);


--
-- Name: razoncapitalsocialportrabajador_naturalezajuridica_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY razoncapitalsocialportrabajador_naturalezajuridica_diff
    ADD CONSTRAINT razoncapitalsocialportrabajador_naturalezajuridica_diff_pkey PRIMARY KEY (id);


--
-- Name: razoncapitalsocialportrabajador_naturalezajuridica_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY razoncapitalsocialportrabajador_naturalezajuridica
    ADD CONSTRAINT razoncapitalsocialportrabajador_naturalezajuridica_pkey PRIMARY KEY (id);


--
-- Name: registro_mercantil_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY registro_mercantil_diff
    ADD CONSTRAINT registro_mercantil_diff_pkey PRIMARY KEY (id);


--
-- Name: registro_mercantil_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY registro_mercantil
    ADD CONSTRAINT registro_mercantil_pkey PRIMARY KEY (id);


--
-- Name: representantelegal_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY representantelegal_diff
    ADD CONSTRAINT representantelegal_diff_pkey PRIMARY KEY (id);


--
-- Name: representantelegal_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY representantelegal
    ADD CONSTRAINT representantelegal_pkey PRIMARY KEY (id);


--
-- Name: responsabilidadsocial_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY responsabilidadsocial_diff
    ADD CONSTRAINT responsabilidadsocial_diff_pkey PRIMARY KEY (id);


--
-- Name: responsabilidadsocial_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY responsabilidadsocial
    ADD CONSTRAINT responsabilidadsocial_pkey PRIMARY KEY (id);


--
-- Name: sede_principal_act_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY sede_principal_act
    ADD CONSTRAINT sede_principal_act_pkey PRIMARY KEY (id);


--
-- Name: sede_principal_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY sede_principal_diff
    ADD CONSTRAINT sede_principal_diff_pkey PRIMARY KEY (id);


--
-- Name: sede_principal_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY sede_principal
    ADD CONSTRAINT sede_principal_pkey PRIMARY KEY (id);


--
-- Name: servicio_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY servicio_diff
    ADD CONSTRAINT servicio_diff_pkey PRIMARY KEY (id);


--
-- Name: servicio_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY servicio
    ADD CONSTRAINT servicio_pkey PRIMARY KEY (id);


--
-- Name: similares_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY similares_diff
    ADD CONSTRAINT similares_diff_pkey PRIMARY KEY (id);


--
-- Name: similares_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY similares
    ADD CONSTRAINT similares_pkey PRIMARY KEY (id);


--
-- Name: socio_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY socio_diff
    ADD CONSTRAINT socio_diff_pkey PRIMARY KEY (id);


--
-- Name: socio_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY socio
    ADD CONSTRAINT socio_pkey PRIMARY KEY (id);


--
-- Name: sucursal_act_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY sucursal_act
    ADD CONSTRAINT sucursal_act_pkey PRIMARY KEY (id);


--
-- Name: sucursal_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY sucursal_diff
    ADD CONSTRAINT sucursal_diff_pkey PRIMARY KEY (id);


--
-- Name: sucursal_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY sucursal
    ADD CONSTRAINT sucursal_pkey PRIMARY KEY (id);


--
-- Name: tipo_actividad_ad_sede_planta_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_actividad_ad_sede_planta_diff
    ADD CONSTRAINT tipo_actividad_ad_sede_planta_diff_pkey PRIMARY KEY (id);


--
-- Name: tipo_actividad_ad_sede_planta_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_actividad_ad_sede_planta
    ADD CONSTRAINT tipo_actividad_ad_sede_planta_pkey PRIMARY KEY (id);


--
-- Name: tipo_ambito_nombre_key; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_ambito
    ADD CONSTRAINT tipo_ambito_nombre_key UNIQUE (nombre);


--
-- Name: tipo_ambito_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_ambito
    ADD CONSTRAINT tipo_ambito_pkey PRIMARY KEY (id);


--
-- Name: tipo_combustible_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_combustible_diff
    ADD CONSTRAINT tipo_combustible_diff_pkey PRIMARY KEY (id);


--
-- Name: tipo_combustible_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_combustible
    ADD CONSTRAINT tipo_combustible_pkey PRIMARY KEY (id);


--
-- Name: tipo_tenencia_nombre_key; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_tenencia
    ADD CONSTRAINT tipo_tenencia_nombre_key UNIQUE (nombre);


--
-- Name: tipo_tenencia_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY tipo_tenencia
    ADD CONSTRAINT tipo_tenencia_pkey PRIMARY KEY (id);


--
-- Name: traduccion_dir_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY traduccion_dir
    ADD CONSTRAINT traduccion_dir_pkey PRIMARY KEY (letra);


--
-- Name: ue_ciiu_ambito_tipoempresa_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ue_ciiu_ambito_tipoempresa_diff
    ADD CONSTRAINT ue_ciiu_ambito_tipoempresa_diff_pkey PRIMARY KEY (id);


--
-- Name: ue_ciiu_ambito_tipoempresa_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ue_ciiu_ambito_tipoempresa
    ADD CONSTRAINT ue_ciiu_ambito_tipoempresa_pkey PRIMARY KEY (id);


--
-- Name: ues_competidoras_y_productos_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_competidoras_y_productos_diff
    ADD CONSTRAINT ues_competidoras_y_productos_diff_pkey PRIMARY KEY (id);


--
-- Name: ues_competidoras_y_productos_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_competidoras_y_productos
    ADD CONSTRAINT ues_competidoras_y_productos_pkey PRIMARY KEY (id);


--
-- Name: ues_marcaproducida_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_marcaproducida_diff
    ADD CONSTRAINT ues_marcaproducida_diff_pkey PRIMARY KEY (id);


--
-- Name: ues_marcaproducida_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_marcaproducida
    ADD CONSTRAINT ues_marcaproducida_pkey PRIMARY KEY (id);


--
-- Name: ues_marcautilizada_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_marcautilizada_diff
    ADD CONSTRAINT ues_marcautilizada_diff_pkey PRIMARY KEY (id);


--
-- Name: ues_marcautilizada_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_marcautilizada
    ADD CONSTRAINT ues_marcautilizada_pkey PRIMARY KEY (id);


--
-- Name: ues_parroquia_representantelegal_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_parroquia_representantelegal_diff
    ADD CONSTRAINT ues_parroquia_representantelegal_diff_pkey PRIMARY KEY (id);


--
-- Name: ues_parroquia_representantelegal_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_parroquia_representantelegal
    ADD CONSTRAINT ues_parroquia_representantelegal_pkey PRIMARY KEY (id);


--
-- Name: ues_parroquia_socio_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_parroquia_socio_diff
    ADD CONSTRAINT ues_parroquia_socio_diff_pkey PRIMARY KEY (id);


--
-- Name: ues_parroquia_socio_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_parroquia_socio
    ADD CONSTRAINT ues_parroquia_socio_pkey PRIMARY KEY (id);


--
-- Name: ues_procesoproductivo_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_procesoproductivo_diff
    ADD CONSTRAINT ues_procesoproductivo_diff_pkey PRIMARY KEY (id);


--
-- Name: ues_procesoproductivo_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_procesoproductivo
    ADD CONSTRAINT ues_procesoproductivo_pkey PRIMARY KEY (id);


--
-- Name: ues_tipo_combustible_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_tipo_combustible_diff
    ADD CONSTRAINT ues_tipo_combustible_diff_pkey PRIMARY KEY (id);


--
-- Name: ues_tipo_combustible_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY ues_tipo_combustible
    ADD CONSTRAINT ues_tipo_combustible_pkey PRIMARY KEY (id);


--
-- Name: unidadmedida_diff_pkey; Type: CONSTRAINT; Schema: public; Owner: administrador; Tablespace: 
--

ALTER TABLE ONLY unidadmedida_diff
    ADD CONSTRAINT unidadmedida_diff_pkey PRIMARY KEY (id);


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
--

