--
--

-- Started on 2013-05-30 11:25:59 VET


--
-- TOC entry 2167 (class 1262 OID 53454)
-- Dependencies: 2166
-- Name: smid_etl; Type: COMMENT; Schema: -; Owner: administrador
--

COMMENT ON DATABASE smid_etl IS 'Procesos ETL del SMID';


--
-- TOC entry 240 (class 3079 OID 11645)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- TOC entry 2170 (class 0 OID 0)
-- Dependencies: 240
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
--

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





--
-- TOC entry 192 (class 1259 OID 53584)
-- Dependencies: 5
-- Name: r_cluster; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_cluster (
    id_cluster bigint NOT NULL,
    name character varying(255),
    base_port character varying(255),
    sockets_buffer_size character varying(255),
    sockets_flush_interval character varying(255),
    sockets_compressed character(1),
    dynamic_cluster character(1)
);


ALTER TABLE public.r_cluster OWNER TO administrador;

--
-- TOC entry 191 (class 1259 OID 53582)
-- Dependencies: 5 192
-- Name: r_cluster_id_cluster_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_cluster_id_cluster_seq OWNER TO administrador;

--
-- TOC entry 2171 (class 0 OID 0)
-- Dependencies: 191
-- Name: r_cluster_id_cluster_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_cluster_id_cluster_seq OWNED BY r_cluster.id_cluster;


--
-- TOC entry 196 (class 1259 OID 53602)
-- Dependencies: 5
-- Name: r_cluster_slave; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_cluster_slave (
    id_cluster_slave bigint NOT NULL,
    id_cluster integer,
    id_slave integer
);


ALTER TABLE public.r_cluster_slave OWNER TO administrador;

--
-- TOC entry 195 (class 1259 OID 53600)
-- Dependencies: 5 196
-- Name: r_cluster_slave_id_cluster_slave_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_cluster_slave_id_cluster_slave_seq OWNER TO administrador;

--
-- TOC entry 2172 (class 0 OID 0)
-- Dependencies: 195
-- Name: r_cluster_slave_id_cluster_slave_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_cluster_slave_id_cluster_slave_seq OWNED BY r_cluster_slave.id_cluster_slave;


--
-- TOC entry 205 (class 1259 OID 53629)
-- Dependencies: 5
-- Name: r_condition; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_condition (
    id_condition bigint NOT NULL,
    id_condition_parent integer,
    negated character(1),
    operator character varying(255),
    left_name character varying(255),
    condition_function character varying(255),
    right_name character varying(255),
    id_value_right integer
);


ALTER TABLE public.r_condition OWNER TO administrador;

--
-- TOC entry 204 (class 1259 OID 53627)
-- Dependencies: 5 205
-- Name: r_condition_id_condition_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_condition_id_condition_seq OWNER TO administrador;

--
-- TOC entry 2173 (class 0 OID 0)
-- Dependencies: 204
-- Name: r_condition_id_condition_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_condition_id_condition_seq OWNED BY r_condition.id_condition;


--
-- TOC entry 172 (class 1259 OID 53499)
-- Dependencies: 5
-- Name: r_database; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_database (
    id_database bigint NOT NULL,
    name character varying(255),
    id_database_type integer,
    id_database_contype integer,
    host_name character varying(255),
    database_name character varying(255),
    port integer,
    username character varying(255),
    password character varying(255),
    servername character varying(255),
    data_tbs character varying(255),
    index_tbs character varying(255)
);


ALTER TABLE public.r_database OWNER TO administrador;

--
-- TOC entry 174 (class 1259 OID 53508)
-- Dependencies: 5
-- Name: r_database_attribute; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_database_attribute (
    id_database_attribute bigint NOT NULL,
    id_database integer,
    code character varying(255),
    value_str character varying(2000000)
);


ALTER TABLE public.r_database_attribute OWNER TO administrador;

--
-- TOC entry 173 (class 1259 OID 53506)
-- Dependencies: 174 5
-- Name: r_database_attribute_id_database_attribute_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_database_attribute_id_database_attribute_seq OWNER TO administrador;

--
-- TOC entry 2174 (class 0 OID 0)
-- Dependencies: 173
-- Name: r_database_attribute_id_database_attribute_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_database_attribute_id_database_attribute_seq OWNED BY r_database_attribute.id_database_attribute;


--
-- TOC entry 168 (class 1259 OID 53481)
-- Dependencies: 5
-- Name: r_database_contype; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_database_contype (
    id_database_contype bigint NOT NULL,
    code character varying(255),
    description character varying(255)
);


ALTER TABLE public.r_database_contype OWNER TO administrador;

--
-- TOC entry 167 (class 1259 OID 53479)
-- Dependencies: 168 5
-- Name: r_database_contype_id_database_contype_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_database_contype_id_database_contype_seq OWNER TO administrador;

--
-- TOC entry 2175 (class 0 OID 0)
-- Dependencies: 167
-- Name: r_database_contype_id_database_contype_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_database_contype_id_database_contype_seq OWNED BY r_database_contype.id_database_contype;


--
-- TOC entry 171 (class 1259 OID 53497)
-- Dependencies: 172 5
-- Name: r_database_id_database_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_database_id_database_seq OWNER TO administrador;

--
-- TOC entry 2176 (class 0 OID 0)
-- Dependencies: 171
-- Name: r_database_id_database_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_database_id_database_seq OWNED BY r_database.id_database;


--
-- TOC entry 166 (class 1259 OID 53472)
-- Dependencies: 5
-- Name: r_database_type; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_database_type (
    id_database_type bigint NOT NULL,
    code character varying(255),
    description character varying(255)
);


ALTER TABLE public.r_database_type OWNER TO administrador;

--
-- TOC entry 165 (class 1259 OID 53470)
-- Dependencies: 166 5
-- Name: r_database_type_id_database_type_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_database_type_id_database_type_seq OWNER TO administrador;

--
-- TOC entry 2177 (class 0 OID 0)
-- Dependencies: 165
-- Name: r_database_type_id_database_type_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_database_type_id_database_type_seq OWNED BY r_database_type.id_database_type;


--
-- TOC entry 184 (class 1259 OID 53554)
-- Dependencies: 5
-- Name: r_dependency; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_dependency (
    id_dependency bigint NOT NULL,
    id_transformation integer,
    id_database integer,
    table_name character varying(255),
    field_name character varying(255)
);


ALTER TABLE public.r_dependency OWNER TO administrador;

--
-- TOC entry 183 (class 1259 OID 53552)
-- Dependencies: 5 184
-- Name: r_dependency_id_dependency_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_dependency_id_dependency_seq OWNER TO administrador;

--
-- TOC entry 2178 (class 0 OID 0)
-- Dependencies: 183
-- Name: r_dependency_id_dependency_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_dependency_id_dependency_seq OWNED BY r_dependency.id_dependency;


--
-- TOC entry 176 (class 1259 OID 53518)
-- Dependencies: 5
-- Name: r_directory; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_directory (
    id_directory bigint NOT NULL,
    id_directory_parent integer,
    directory_name character varying(255)
);


ALTER TABLE public.r_directory OWNER TO administrador;

--
-- TOC entry 175 (class 1259 OID 53516)
-- Dependencies: 5 176
-- Name: r_directory_id_directory_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_directory_id_directory_seq OWNER TO administrador;

--
-- TOC entry 2179 (class 0 OID 0)
-- Dependencies: 175
-- Name: r_directory_id_directory_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_directory_id_directory_seq OWNED BY r_directory.id_directory;


--
-- TOC entry 221 (class 1259 OID 53701)
-- Dependencies: 5
-- Name: r_job; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_job (
    id_job bigint NOT NULL,
    id_directory integer,
    name character varying(255),
    description character varying(2000000),
    extended_description character varying(2000000),
    job_version character varying(255),
    job_status integer,
    id_database_log integer,
    table_name_log character varying(255),
    created_user character varying(255),
    created_date timestamp without time zone,
    modified_user character varying(255),
    modified_date timestamp without time zone,
    use_batch_id character(1),
    pass_batch_id character(1),
    use_logfield character(1),
    shared_file character varying(255)
);


ALTER TABLE public.r_job OWNER TO administrador;

--
-- TOC entry 182 (class 1259 OID 53544)
-- Dependencies: 5
-- Name: r_job_attribute; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_job_attribute (
    id_job_attribute bigint NOT NULL,
    id_job integer,
    nr integer,
    code character varying(255),
    value_num bigint,
    value_str character varying(2000000)
);


ALTER TABLE public.r_job_attribute OWNER TO administrador;

--
-- TOC entry 181 (class 1259 OID 53542)
-- Dependencies: 182 5
-- Name: r_job_attribute_id_job_attribute_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_job_attribute_id_job_attribute_seq OWNER TO administrador;

--
-- TOC entry 2180 (class 0 OID 0)
-- Dependencies: 181
-- Name: r_job_attribute_id_job_attribute_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_job_attribute_id_job_attribute_seq OWNED BY r_job_attribute.id_job_attribute;


--
-- TOC entry 232 (class 1259 OID 53749)
-- Dependencies: 5
-- Name: r_job_hop; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_job_hop (
    id_job_hop bigint NOT NULL,
    id_job integer,
    id_jobentry_copy_from integer,
    id_jobentry_copy_to integer,
    enabled character(1),
    evaluation character(1),
    unconditional character(1)
);


ALTER TABLE public.r_job_hop OWNER TO administrador;

--
-- TOC entry 231 (class 1259 OID 53747)
-- Dependencies: 232 5
-- Name: r_job_hop_id_job_hop_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_job_hop_id_job_hop_seq OWNER TO administrador;

--
-- TOC entry 2181 (class 0 OID 0)
-- Dependencies: 231
-- Name: r_job_hop_id_job_hop_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_job_hop_id_job_hop_seq OWNED BY r_job_hop.id_job_hop;


--
-- TOC entry 220 (class 1259 OID 53699)
-- Dependencies: 221 5
-- Name: r_job_id_job_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_job_id_job_seq OWNER TO administrador;

--
-- TOC entry 2182 (class 0 OID 0)
-- Dependencies: 220
-- Name: r_job_id_job_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_job_id_job_seq OWNED BY r_job.id_job;


--
-- TOC entry 237 (class 1259 OID 53767)
-- Dependencies: 5
-- Name: r_job_lock; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_job_lock (
    id_job_lock bigint NOT NULL,
    id_job integer,
    id_user integer,
    lock_message character varying(2000000),
    lock_date timestamp without time zone
);


ALTER TABLE public.r_job_lock OWNER TO administrador;

--
-- TOC entry 236 (class 1259 OID 53765)
-- Dependencies: 5 237
-- Name: r_job_lock_id_job_lock_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_job_lock_id_job_lock_seq OWNER TO administrador;

--
-- TOC entry 2183 (class 0 OID 0)
-- Dependencies: 236
-- Name: r_job_lock_id_job_lock_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_job_lock_id_job_lock_seq OWNED BY r_job_lock.id_job_lock;


--
-- TOC entry 233 (class 1259 OID 53753)
-- Dependencies: 5
-- Name: r_job_note; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_job_note (
    id_job integer,
    id_note integer
);


ALTER TABLE public.r_job_note OWNER TO administrador;

--
-- TOC entry 226 (class 1259 OID 53724)
-- Dependencies: 5
-- Name: r_jobentry; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_jobentry (
    id_jobentry bigint NOT NULL,
    id_job integer,
    id_jobentry_type integer,
    name character varying(255),
    description character varying(2000000)
);


ALTER TABLE public.r_jobentry OWNER TO administrador;

--
-- TOC entry 230 (class 1259 OID 53739)
-- Dependencies: 5
-- Name: r_jobentry_attribute; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_jobentry_attribute (
    id_jobentry_attribute bigint NOT NULL,
    id_job integer,
    id_jobentry integer,
    nr integer,
    code character varying(255),
    value_num numeric(15,2),
    value_str character varying(2000000)
);


ALTER TABLE public.r_jobentry_attribute OWNER TO administrador;

--
-- TOC entry 229 (class 1259 OID 53737)
-- Dependencies: 230 5
-- Name: r_jobentry_attribute_id_jobentry_attribute_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_jobentry_attribute_id_jobentry_attribute_seq OWNER TO administrador;

--
-- TOC entry 2184 (class 0 OID 0)
-- Dependencies: 229
-- Name: r_jobentry_attribute_id_jobentry_attribute_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_jobentry_attribute_id_jobentry_attribute_seq OWNED BY r_jobentry_attribute.id_jobentry_attribute;


--
-- TOC entry 228 (class 1259 OID 53733)
-- Dependencies: 5
-- Name: r_jobentry_copy; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_jobentry_copy (
    id_jobentry_copy bigint NOT NULL,
    id_jobentry integer,
    id_job integer,
    id_jobentry_type integer,
    nr smallint,
    gui_location_x integer,
    gui_location_y integer,
    gui_draw character(1),
    parallel character(1)
);


ALTER TABLE public.r_jobentry_copy OWNER TO administrador;

--
-- TOC entry 227 (class 1259 OID 53731)
-- Dependencies: 5 228
-- Name: r_jobentry_copy_id_jobentry_copy_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_jobentry_copy_id_jobentry_copy_seq OWNER TO administrador;

--
-- TOC entry 2185 (class 0 OID 0)
-- Dependencies: 227
-- Name: r_jobentry_copy_id_jobentry_copy_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_jobentry_copy_id_jobentry_copy_seq OWNED BY r_jobentry_copy.id_jobentry_copy;


--
-- TOC entry 222 (class 1259 OID 53708)
-- Dependencies: 5
-- Name: r_jobentry_database; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_jobentry_database (
    id_job integer,
    id_jobentry integer,
    id_database integer
);


ALTER TABLE public.r_jobentry_database OWNER TO administrador;

--
-- TOC entry 225 (class 1259 OID 53722)
-- Dependencies: 5 226
-- Name: r_jobentry_id_jobentry_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_jobentry_id_jobentry_seq OWNER TO administrador;

--
-- TOC entry 2186 (class 0 OID 0)
-- Dependencies: 225
-- Name: r_jobentry_id_jobentry_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_jobentry_id_jobentry_seq OWNED BY r_jobentry.id_jobentry;


--
-- TOC entry 224 (class 1259 OID 53715)
-- Dependencies: 5
-- Name: r_jobentry_type; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_jobentry_type (
    id_jobentry_type bigint NOT NULL,
    code character varying(255),
    description character varying(255)
);


ALTER TABLE public.r_jobentry_type OWNER TO administrador;

--
-- TOC entry 223 (class 1259 OID 53713)
-- Dependencies: 224 5
-- Name: r_jobentry_type_id_jobentry_type_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_jobentry_type_id_jobentry_type_seq OWNER TO administrador;

--
-- TOC entry 2187 (class 0 OID 0)
-- Dependencies: 223
-- Name: r_jobentry_type_id_jobentry_type_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_jobentry_type_id_jobentry_type_seq OWNED BY r_jobentry_type.id_jobentry_type;


--
-- TOC entry 219 (class 1259 OID 53692)
-- Dependencies: 5
-- Name: r_log; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_log (
    id_log bigint NOT NULL,
    name character varying(255),
    id_loglevel integer,
    logtype character varying(255),
    filename character varying(255),
    fileextention character varying(255),
    add_date character(1),
    add_time character(1),
    id_database_log integer,
    table_name_log character varying(255)
);


ALTER TABLE public.r_log OWNER TO administrador;

--
-- TOC entry 218 (class 1259 OID 53690)
-- Dependencies: 5 219
-- Name: r_log_id_log_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_log_id_log_seq OWNER TO administrador;

--
-- TOC entry 2188 (class 0 OID 0)
-- Dependencies: 218
-- Name: r_log_id_log_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_log_id_log_seq OWNED BY r_log.id_log;


--
-- TOC entry 217 (class 1259 OID 53683)
-- Dependencies: 5
-- Name: r_loglevel; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_loglevel (
    id_loglevel bigint NOT NULL,
    code character varying(255),
    description character varying(255)
);


ALTER TABLE public.r_loglevel OWNER TO administrador;

--
-- TOC entry 216 (class 1259 OID 53681)
-- Dependencies: 5 217
-- Name: r_loglevel_id_loglevel_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_loglevel_id_loglevel_seq OWNER TO administrador;

--
-- TOC entry 2189 (class 0 OID 0)
-- Dependencies: 216
-- Name: r_loglevel_id_loglevel_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_loglevel_id_loglevel_seq OWNED BY r_loglevel.id_loglevel;


--
-- TOC entry 170 (class 1259 OID 53490)
-- Dependencies: 5
-- Name: r_note; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_note (
    id_note bigint NOT NULL,
    value_str character varying(2000000),
    gui_location_x integer,
    gui_location_y integer,
    gui_location_width integer,
    gui_location_height integer,
    font_name character varying(2000000),
    font_size integer,
    font_bold character(1),
    font_italic character(1),
    font_color_red integer,
    font_color_green integer,
    font_color_blue integer,
    font_back_ground_color_red integer,
    font_back_ground_color_green integer,
    font_back_ground_color_blue integer,
    font_border_color_red integer,
    font_border_color_green integer,
    font_border_color_blue integer,
    draw_shadow character(1)
);


ALTER TABLE public.r_note OWNER TO administrador;

--
-- TOC entry 169 (class 1259 OID 53488)
-- Dependencies: 5 170
-- Name: r_note_id_note_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_note_id_note_seq OWNER TO administrador;

--
-- TOC entry 2190 (class 0 OID 0)
-- Dependencies: 169
-- Name: r_note_id_note_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_note_id_note_seq OWNED BY r_note.id_note;


--
-- TOC entry 188 (class 1259 OID 53572)
-- Dependencies: 5
-- Name: r_partition; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_partition (
    id_partition bigint NOT NULL,
    id_partition_schema integer,
    partition_id character varying(255)
);


ALTER TABLE public.r_partition OWNER TO administrador;

--
-- TOC entry 187 (class 1259 OID 53570)
-- Dependencies: 5 188
-- Name: r_partition_id_partition_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_partition_id_partition_seq OWNER TO administrador;

--
-- TOC entry 2191 (class 0 OID 0)
-- Dependencies: 187
-- Name: r_partition_id_partition_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_partition_id_partition_seq OWNED BY r_partition.id_partition;


--
-- TOC entry 186 (class 1259 OID 53563)
-- Dependencies: 5
-- Name: r_partition_schema; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_partition_schema (
    id_partition_schema bigint NOT NULL,
    name character varying(255),
    dynamic_definition character(1),
    partitions_per_slave character varying(255)
);


ALTER TABLE public.r_partition_schema OWNER TO administrador;

--
-- TOC entry 185 (class 1259 OID 53561)
-- Dependencies: 5 186
-- Name: r_partition_schema_id_partition_schema_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_partition_schema_id_partition_schema_seq OWNER TO administrador;

--
-- TOC entry 2192 (class 0 OID 0)
-- Dependencies: 185
-- Name: r_partition_schema_id_partition_schema_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_partition_schema_id_partition_schema_seq OWNED BY r_partition_schema.id_partition_schema;


--
-- TOC entry 162 (class 1259 OID 53457)
-- Dependencies: 5
-- Name: r_repository_log; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_repository_log (
    id_repository_log bigint NOT NULL,
    rep_version character varying(255),
    log_date timestamp without time zone,
    log_user character varying(255),
    operation_desc character varying(2000000)
);


ALTER TABLE public.r_repository_log OWNER TO administrador;

--
-- TOC entry 161 (class 1259 OID 53455)
-- Dependencies: 5 162
-- Name: r_repository_log_id_repository_log_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_repository_log_id_repository_log_seq OWNER TO administrador;

--
-- TOC entry 2193 (class 0 OID 0)
-- Dependencies: 161
-- Name: r_repository_log_id_repository_log_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_repository_log_id_repository_log_seq OWNED BY r_repository_log.id_repository_log;


--
-- TOC entry 194 (class 1259 OID 53593)
-- Dependencies: 5
-- Name: r_slave; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_slave (
    id_slave bigint NOT NULL,
    name character varying(255),
    host_name character varying(255),
    port character varying(255),
    web_app_name character varying(255),
    username character varying(255),
    password character varying(255),
    proxy_host_name character varying(255),
    proxy_port character varying(255),
    non_proxy_hosts character varying(255),
    master character(1)
);


ALTER TABLE public.r_slave OWNER TO administrador;

--
-- TOC entry 193 (class 1259 OID 53591)
-- Dependencies: 5 194
-- Name: r_slave_id_slave_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_slave_id_slave_seq OWNER TO administrador;

--
-- TOC entry 2194 (class 0 OID 0)
-- Dependencies: 193
-- Name: r_slave_id_slave_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_slave_id_slave_seq OWNED BY r_slave.id_slave;


--
-- TOC entry 211 (class 1259 OID 53656)
-- Dependencies: 5
-- Name: r_step; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_step (
    id_step bigint NOT NULL,
    id_transformation integer,
    name character varying(255),
    description character varying(2000000),
    id_step_type integer,
    distribute character(1),
    copies smallint,
    gui_location_x integer,
    gui_location_y integer,
    gui_draw character(1)
);


ALTER TABLE public.r_step OWNER TO administrador;

--
-- TOC entry 213 (class 1259 OID 53665)
-- Dependencies: 5
-- Name: r_step_attribute; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_step_attribute (
    id_step_attribute bigint NOT NULL,
    id_transformation integer,
    id_step integer,
    nr integer,
    code character varying(255),
    value_num bigint,
    value_str character varying(2000000)
);


ALTER TABLE public.r_step_attribute OWNER TO administrador;

--
-- TOC entry 212 (class 1259 OID 53663)
-- Dependencies: 213 5
-- Name: r_step_attribute_id_step_attribute_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_step_attribute_id_step_attribute_seq OWNER TO administrador;

--
-- TOC entry 2195 (class 0 OID 0)
-- Dependencies: 212
-- Name: r_step_attribute_id_step_attribute_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_step_attribute_id_step_attribute_seq OWNED BY r_step_attribute.id_step_attribute;


--
-- TOC entry 214 (class 1259 OID 53673)
-- Dependencies: 5
-- Name: r_step_database; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_step_database (
    id_transformation integer,
    id_step integer,
    id_database integer
);


ALTER TABLE public.r_step_database OWNER TO administrador;

--
-- TOC entry 210 (class 1259 OID 53654)
-- Dependencies: 211 5
-- Name: r_step_id_step_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_step_id_step_seq OWNER TO administrador;

--
-- TOC entry 2196 (class 0 OID 0)
-- Dependencies: 210
-- Name: r_step_id_step_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_step_id_step_seq OWNED BY r_step.id_step;


--
-- TOC entry 209 (class 1259 OID 53647)
-- Dependencies: 5
-- Name: r_step_type; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_step_type (
    id_step_type bigint NOT NULL,
    code character varying(255),
    description character varying(255),
    helptext character varying(255)
);


ALTER TABLE public.r_step_type OWNER TO administrador;

--
-- TOC entry 208 (class 1259 OID 53645)
-- Dependencies: 209 5
-- Name: r_step_type_id_step_type_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_step_type_id_step_type_seq OWNER TO administrador;

--
-- TOC entry 2197 (class 0 OID 0)
-- Dependencies: 208
-- Name: r_step_type_id_step_type_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_step_type_id_step_type_seq OWNED BY r_step_type.id_step_type;


--
-- TOC entry 180 (class 1259 OID 53534)
-- Dependencies: 5
-- Name: r_trans_attribute; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_attribute (
    id_trans_attribute bigint NOT NULL,
    id_transformation integer,
    nr integer,
    code character varying(255),
    value_num bigint,
    value_str character varying(2000000)
);


ALTER TABLE public.r_trans_attribute OWNER TO administrador;

--
-- TOC entry 179 (class 1259 OID 53532)
-- Dependencies: 180 5
-- Name: r_trans_attribute_id_trans_attribute_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_trans_attribute_id_trans_attribute_seq OWNER TO administrador;

--
-- TOC entry 2198 (class 0 OID 0)
-- Dependencies: 179
-- Name: r_trans_attribute_id_trans_attribute_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_trans_attribute_id_trans_attribute_seq OWNED BY r_trans_attribute.id_trans_attribute;


--
-- TOC entry 200 (class 1259 OID 53614)
-- Dependencies: 5
-- Name: r_trans_cluster; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_cluster (
    id_trans_cluster bigint NOT NULL,
    id_transformation integer,
    id_cluster integer
);


ALTER TABLE public.r_trans_cluster OWNER TO administrador;

--
-- TOC entry 199 (class 1259 OID 53612)
-- Dependencies: 200 5
-- Name: r_trans_cluster_id_trans_cluster_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_trans_cluster_id_trans_cluster_seq OWNER TO administrador;

--
-- TOC entry 2199 (class 0 OID 0)
-- Dependencies: 199
-- Name: r_trans_cluster_id_trans_cluster_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_trans_cluster_id_trans_cluster_seq OWNED BY r_trans_cluster.id_trans_cluster;


--
-- TOC entry 202 (class 1259 OID 53620)
-- Dependencies: 5
-- Name: r_trans_hop; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_hop (
    id_trans_hop bigint NOT NULL,
    id_transformation integer,
    id_step_from integer,
    id_step_to integer,
    enabled character(1)
);


ALTER TABLE public.r_trans_hop OWNER TO administrador;

--
-- TOC entry 201 (class 1259 OID 53618)
-- Dependencies: 5 202
-- Name: r_trans_hop_id_trans_hop_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_trans_hop_id_trans_hop_seq OWNER TO administrador;

--
-- TOC entry 2200 (class 0 OID 0)
-- Dependencies: 201
-- Name: r_trans_hop_id_trans_hop_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_trans_hop_id_trans_hop_seq OWNED BY r_trans_hop.id_trans_hop;


--
-- TOC entry 235 (class 1259 OID 53758)
-- Dependencies: 5
-- Name: r_trans_lock; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_lock (
    id_trans_lock bigint NOT NULL,
    id_transformation integer,
    id_user integer,
    lock_message character varying(2000000),
    lock_date timestamp without time zone
);


ALTER TABLE public.r_trans_lock OWNER TO administrador;

--
-- TOC entry 234 (class 1259 OID 53756)
-- Dependencies: 235 5
-- Name: r_trans_lock_id_trans_lock_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_trans_lock_id_trans_lock_seq OWNER TO administrador;

--
-- TOC entry 2201 (class 0 OID 0)
-- Dependencies: 234
-- Name: r_trans_lock_id_trans_lock_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_trans_lock_id_trans_lock_seq OWNED BY r_trans_lock.id_trans_lock;


--
-- TOC entry 215 (class 1259 OID 53678)
-- Dependencies: 5
-- Name: r_trans_note; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_note (
    id_transformation integer,
    id_note integer
);


ALTER TABLE public.r_trans_note OWNER TO administrador;

--
-- TOC entry 190 (class 1259 OID 53578)
-- Dependencies: 5
-- Name: r_trans_partition_schema; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_partition_schema (
    id_trans_partition_schema bigint NOT NULL,
    id_transformation integer,
    id_partition_schema integer
);


ALTER TABLE public.r_trans_partition_schema OWNER TO administrador;

--
-- TOC entry 189 (class 1259 OID 53576)
-- Dependencies: 5 190
-- Name: r_trans_partition_schema_id_trans_partition_schema_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_trans_partition_schema_id_trans_partition_schema_seq OWNER TO administrador;

--
-- TOC entry 2202 (class 0 OID 0)
-- Dependencies: 189
-- Name: r_trans_partition_schema_id_trans_partition_schema_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_trans_partition_schema_id_trans_partition_schema_seq OWNED BY r_trans_partition_schema.id_trans_partition_schema;


--
-- TOC entry 198 (class 1259 OID 53608)
-- Dependencies: 5
-- Name: r_trans_slave; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_slave (
    id_trans_slave bigint NOT NULL,
    id_transformation integer,
    id_slave integer
);


ALTER TABLE public.r_trans_slave OWNER TO administrador;

--
-- TOC entry 197 (class 1259 OID 53606)
-- Dependencies: 5 198
-- Name: r_trans_slave_id_trans_slave_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_trans_slave_id_trans_slave_seq OWNER TO administrador;

--
-- TOC entry 2203 (class 0 OID 0)
-- Dependencies: 197
-- Name: r_trans_slave_id_trans_slave_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_trans_slave_id_trans_slave_seq OWNED BY r_trans_slave.id_trans_slave;


--
-- TOC entry 203 (class 1259 OID 53624)
-- Dependencies: 5
-- Name: r_trans_step_condition; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_trans_step_condition (
    id_transformation integer,
    id_step integer,
    id_condition integer
);


ALTER TABLE public.r_trans_step_condition OWNER TO administrador;

--
-- TOC entry 178 (class 1259 OID 53525)
-- Dependencies: 5
-- Name: r_transformation; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_transformation (
    id_transformation bigint NOT NULL,
    id_directory integer,
    name character varying(255),
    description character varying(2000000),
    extended_description character varying(2000000),
    trans_version character varying(255),
    trans_status integer,
    id_step_read integer,
    id_step_write integer,
    id_step_input integer,
    id_step_output integer,
    id_step_update integer,
    id_database_log integer,
    table_name_log character varying(255),
    use_batchid character(1),
    use_logfield character(1),
    id_database_maxdate integer,
    table_name_maxdate character varying(255),
    field_name_maxdate character varying(255),
    offset_maxdate numeric(14,2),
    diff_maxdate numeric(14,2),
    created_user character varying(255),
    created_date timestamp without time zone,
    modified_user character varying(255),
    modified_date timestamp without time zone,
    size_rowset integer
);


ALTER TABLE public.r_transformation OWNER TO administrador;

--
-- TOC entry 177 (class 1259 OID 53523)
-- Dependencies: 178 5
-- Name: r_transformation_id_transformation_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_transformation_id_transformation_seq OWNER TO administrador;

--
-- TOC entry 2204 (class 0 OID 0)
-- Dependencies: 177
-- Name: r_transformation_id_transformation_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_transformation_id_transformation_seq OWNED BY r_transformation.id_transformation;


--
-- TOC entry 239 (class 1259 OID 53776)
-- Dependencies: 5
-- Name: r_user; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_user (
    id_user bigint NOT NULL,
    login character varying(255),
    password character varying(255),
    name character varying(255),
    description character varying(255),
    enabled character(1)
);


ALTER TABLE public.r_user OWNER TO administrador;

--
-- TOC entry 238 (class 1259 OID 53774)
-- Dependencies: 239 5
-- Name: r_user_id_user_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_user_id_user_seq OWNER TO administrador;

--
-- TOC entry 2205 (class 0 OID 0)
-- Dependencies: 238
-- Name: r_user_id_user_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_user_id_user_seq OWNED BY r_user.id_user;


--
-- TOC entry 207 (class 1259 OID 53638)
-- Dependencies: 5
-- Name: r_value; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_value (
    id_value bigint NOT NULL,
    name character varying(255),
    value_type character varying(255),
    value_str character varying(255),
    is_null character(1)
);


ALTER TABLE public.r_value OWNER TO administrador;

--
-- TOC entry 206 (class 1259 OID 53636)
-- Dependencies: 5 207
-- Name: r_value_id_value_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_value_id_value_seq OWNER TO administrador;

--
-- TOC entry 2206 (class 0 OID 0)
-- Dependencies: 206
-- Name: r_value_id_value_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_value_id_value_seq OWNED BY r_value.id_value;


--
-- TOC entry 164 (class 1259 OID 53466)
-- Dependencies: 5
-- Name: r_version; Type: TABLE; Schema: public; Owner: administrador; Tablespace: 
--

CREATE TABLE r_version (
    id_version bigint NOT NULL,
    major_version smallint,
    minor_version smallint,
    upgrade_date timestamp without time zone,
    is_upgrade character(1)
);


ALTER TABLE public.r_version OWNER TO administrador;

--
-- TOC entry 163 (class 1259 OID 53464)
-- Dependencies: 5 164
-- Name: r_version_id_version_seq; Type: SEQUENCE; Schema: public; Owner: administrador
--

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


ALTER TABLE public.r_version_id_version_seq OWNER TO administrador;

--
-- TOC entry 2207 (class 0 OID 0)
-- Dependencies: 163
-- Name: r_version_id_version_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: administrador
--

ALTER SEQUENCE r_version_id_version_seq OWNED BY r_version.id_version;


--
-- TOC entry 2130 (class 2604 OID 53587)
-- Dependencies: 192 191 192
-- Name: id_cluster; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_cluster ALTER COLUMN id_cluster SET DEFAULT nextval('r_cluster_id_cluster_seq'::regclass);


--
-- TOC entry 2132 (class 2604 OID 53605)
-- Dependencies: 196 195 196
-- Name: id_cluster_slave; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_cluster_slave ALTER COLUMN id_cluster_slave SET DEFAULT nextval('r_cluster_slave_id_cluster_slave_seq'::regclass);


--
-- TOC entry 2136 (class 2604 OID 53632)
-- Dependencies: 204 205 205
-- Name: id_condition; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_condition ALTER COLUMN id_condition SET DEFAULT nextval('r_condition_id_condition_seq'::regclass);


--
-- TOC entry 2120 (class 2604 OID 53502)
-- Dependencies: 171 172 172
-- Name: id_database; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_database ALTER COLUMN id_database SET DEFAULT nextval('r_database_id_database_seq'::regclass);


--
-- TOC entry 2121 (class 2604 OID 53511)
-- Dependencies: 174 173 174
-- Name: id_database_attribute; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_database_attribute ALTER COLUMN id_database_attribute SET DEFAULT nextval('r_database_attribute_id_database_attribute_seq'::regclass);


--
-- TOC entry 2118 (class 2604 OID 53484)
-- Dependencies: 167 168 168
-- Name: id_database_contype; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_database_contype ALTER COLUMN id_database_contype SET DEFAULT nextval('r_database_contype_id_database_contype_seq'::regclass);


--
-- TOC entry 2117 (class 2604 OID 53475)
-- Dependencies: 165 166 166
-- Name: id_database_type; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_database_type ALTER COLUMN id_database_type SET DEFAULT nextval('r_database_type_id_database_type_seq'::regclass);


--
-- TOC entry 2126 (class 2604 OID 53557)
-- Dependencies: 183 184 184
-- Name: id_dependency; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_dependency ALTER COLUMN id_dependency SET DEFAULT nextval('r_dependency_id_dependency_seq'::regclass);


--
-- TOC entry 2122 (class 2604 OID 53521)
-- Dependencies: 175 176 176
-- Name: id_directory; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_directory ALTER COLUMN id_directory SET DEFAULT nextval('r_directory_id_directory_seq'::regclass);


--
-- TOC entry 2143 (class 2604 OID 53704)
-- Dependencies: 221 220 221
-- Name: id_job; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_job ALTER COLUMN id_job SET DEFAULT nextval('r_job_id_job_seq'::regclass);


--
-- TOC entry 2125 (class 2604 OID 53547)
-- Dependencies: 182 181 182
-- Name: id_job_attribute; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_job_attribute ALTER COLUMN id_job_attribute SET DEFAULT nextval('r_job_attribute_id_job_attribute_seq'::regclass);


--
-- TOC entry 2148 (class 2604 OID 53752)
-- Dependencies: 231 232 232
-- Name: id_job_hop; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_job_hop ALTER COLUMN id_job_hop SET DEFAULT nextval('r_job_hop_id_job_hop_seq'::regclass);


--
-- TOC entry 2150 (class 2604 OID 53770)
-- Dependencies: 237 236 237
-- Name: id_job_lock; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_job_lock ALTER COLUMN id_job_lock SET DEFAULT nextval('r_job_lock_id_job_lock_seq'::regclass);


--
-- TOC entry 2145 (class 2604 OID 53727)
-- Dependencies: 226 225 226
-- Name: id_jobentry; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_jobentry ALTER COLUMN id_jobentry SET DEFAULT nextval('r_jobentry_id_jobentry_seq'::regclass);


--
-- TOC entry 2147 (class 2604 OID 53742)
-- Dependencies: 230 229 230
-- Name: id_jobentry_attribute; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_jobentry_attribute ALTER COLUMN id_jobentry_attribute SET DEFAULT nextval('r_jobentry_attribute_id_jobentry_attribute_seq'::regclass);


--
-- TOC entry 2146 (class 2604 OID 53736)
-- Dependencies: 227 228 228
-- Name: id_jobentry_copy; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_jobentry_copy ALTER COLUMN id_jobentry_copy SET DEFAULT nextval('r_jobentry_copy_id_jobentry_copy_seq'::regclass);


--
-- TOC entry 2144 (class 2604 OID 53718)
-- Dependencies: 224 223 224
-- Name: id_jobentry_type; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_jobentry_type ALTER COLUMN id_jobentry_type SET DEFAULT nextval('r_jobentry_type_id_jobentry_type_seq'::regclass);


--
-- TOC entry 2142 (class 2604 OID 53695)
-- Dependencies: 219 218 219
-- Name: id_log; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_log ALTER COLUMN id_log SET DEFAULT nextval('r_log_id_log_seq'::regclass);


--
-- TOC entry 2141 (class 2604 OID 53686)
-- Dependencies: 217 216 217
-- Name: id_loglevel; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_loglevel ALTER COLUMN id_loglevel SET DEFAULT nextval('r_loglevel_id_loglevel_seq'::regclass);


--
-- TOC entry 2119 (class 2604 OID 53493)
-- Dependencies: 170 169 170
-- Name: id_note; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_note ALTER COLUMN id_note SET DEFAULT nextval('r_note_id_note_seq'::regclass);


--
-- TOC entry 2128 (class 2604 OID 53575)
-- Dependencies: 188 187 188
-- Name: id_partition; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_partition ALTER COLUMN id_partition SET DEFAULT nextval('r_partition_id_partition_seq'::regclass);


--
-- TOC entry 2127 (class 2604 OID 53566)
-- Dependencies: 186 185 186
-- Name: id_partition_schema; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_partition_schema ALTER COLUMN id_partition_schema SET DEFAULT nextval('r_partition_schema_id_partition_schema_seq'::regclass);


--
-- TOC entry 2115 (class 2604 OID 53460)
-- Dependencies: 162 161 162
-- Name: id_repository_log; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_repository_log ALTER COLUMN id_repository_log SET DEFAULT nextval('r_repository_log_id_repository_log_seq'::regclass);


--
-- TOC entry 2131 (class 2604 OID 53596)
-- Dependencies: 193 194 194
-- Name: id_slave; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_slave ALTER COLUMN id_slave SET DEFAULT nextval('r_slave_id_slave_seq'::regclass);


--
-- TOC entry 2139 (class 2604 OID 53659)
-- Dependencies: 211 210 211
-- Name: id_step; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_step ALTER COLUMN id_step SET DEFAULT nextval('r_step_id_step_seq'::regclass);


--
-- TOC entry 2140 (class 2604 OID 53668)
-- Dependencies: 212 213 213
-- Name: id_step_attribute; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_step_attribute ALTER COLUMN id_step_attribute SET DEFAULT nextval('r_step_attribute_id_step_attribute_seq'::regclass);


--
-- TOC entry 2138 (class 2604 OID 53650)
-- Dependencies: 209 208 209
-- Name: id_step_type; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_step_type ALTER COLUMN id_step_type SET DEFAULT nextval('r_step_type_id_step_type_seq'::regclass);


--
-- TOC entry 2124 (class 2604 OID 53537)
-- Dependencies: 179 180 180
-- Name: id_trans_attribute; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_trans_attribute ALTER COLUMN id_trans_attribute SET DEFAULT nextval('r_trans_attribute_id_trans_attribute_seq'::regclass);


--
-- TOC entry 2134 (class 2604 OID 53617)
-- Dependencies: 200 199 200
-- Name: id_trans_cluster; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_trans_cluster ALTER COLUMN id_trans_cluster SET DEFAULT nextval('r_trans_cluster_id_trans_cluster_seq'::regclass);


--
-- TOC entry 2135 (class 2604 OID 53623)
-- Dependencies: 202 201 202
-- Name: id_trans_hop; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_trans_hop ALTER COLUMN id_trans_hop SET DEFAULT nextval('r_trans_hop_id_trans_hop_seq'::regclass);


--
-- TOC entry 2149 (class 2604 OID 53761)
-- Dependencies: 234 235 235
-- Name: id_trans_lock; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_trans_lock ALTER COLUMN id_trans_lock SET DEFAULT nextval('r_trans_lock_id_trans_lock_seq'::regclass);


--
-- TOC entry 2129 (class 2604 OID 53581)
-- Dependencies: 190 189 190
-- Name: id_trans_partition_schema; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_trans_partition_schema ALTER COLUMN id_trans_partition_schema SET DEFAULT nextval('r_trans_partition_schema_id_trans_partition_schema_seq'::regclass);


--
-- TOC entry 2133 (class 2604 OID 53611)
-- Dependencies: 198 197 198
-- Name: id_trans_slave; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_trans_slave ALTER COLUMN id_trans_slave SET DEFAULT nextval('r_trans_slave_id_trans_slave_seq'::regclass);


--
-- TOC entry 2123 (class 2604 OID 53528)
-- Dependencies: 178 177 178
-- Name: id_transformation; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_transformation ALTER COLUMN id_transformation SET DEFAULT nextval('r_transformation_id_transformation_seq'::regclass);


--
-- TOC entry 2151 (class 2604 OID 53779)
-- Dependencies: 238 239 239
-- Name: id_user; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_user ALTER COLUMN id_user SET DEFAULT nextval('r_user_id_user_seq'::regclass);


--
-- TOC entry 2137 (class 2604 OID 53641)
-- Dependencies: 207 206 207
-- Name: id_value; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_value ALTER COLUMN id_value SET DEFAULT nextval('r_value_id_value_seq'::regclass);


--
-- TOC entry 2116 (class 2604 OID 53469)
-- Dependencies: 164 163 164
-- Name: id_version; Type: DEFAULT; Schema: public; Owner: administrador
--

ALTER TABLE ONLY r_version ALTER COLUMN id_version SET DEFAULT nextval('r_version_id_version_seq'::regclass);


--
-- TOC entry 2155 (class 1259 OID 53551)
-- Dependencies: 182 182 182 2163
-- Name: idx_job_attribute_lookup; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE UNIQUE INDEX idx_job_attribute_lookup ON r_job_attribute USING btree (id_job, code, nr);


--
-- TOC entry 2152 (class 1259 OID 53515)
-- Dependencies: 174 174 2163
-- Name: idx_r_database_attribute_ak; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE UNIQUE INDEX idx_r_database_attribute_ak ON r_database_attribute USING btree (id_database, code);


--
-- TOC entry 2153 (class 1259 OID 53522)
-- Dependencies: 176 176 2163
-- Name: idx_r_directory_ak; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE UNIQUE INDEX idx_r_directory_ak ON r_directory USING btree (id_directory_parent, directory_name);


--
-- TOC entry 2161 (class 1259 OID 53746)
-- Dependencies: 230 230 230 2163
-- Name: idx_r_jobentry_attribute_lookup; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE UNIQUE INDEX idx_r_jobentry_attribute_lookup ON r_jobentry_attribute USING btree (id_jobentry_attribute, code, nr);


--
-- TOC entry 2159 (class 1259 OID 53711)
-- Dependencies: 222 2163
-- Name: idx_r_jobentry_database_lu1; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE INDEX idx_r_jobentry_database_lu1 ON r_jobentry_database USING btree (id_job);


--
-- TOC entry 2160 (class 1259 OID 53712)
-- Dependencies: 222 2163
-- Name: idx_r_jobentry_database_lu2; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE INDEX idx_r_jobentry_database_lu2 ON r_jobentry_database USING btree (id_database);


--
-- TOC entry 2156 (class 1259 OID 53672)
-- Dependencies: 213 213 213 2163
-- Name: idx_r_step_attribute_lookup; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE UNIQUE INDEX idx_r_step_attribute_lookup ON r_step_attribute USING btree (id_step, code, nr);


--
-- TOC entry 2157 (class 1259 OID 53676)
-- Dependencies: 214 2163
-- Name: idx_r_step_database_lu1; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE INDEX idx_r_step_database_lu1 ON r_step_database USING btree (id_transformation);


--
-- TOC entry 2158 (class 1259 OID 53677)
-- Dependencies: 214 2163
-- Name: idx_r_step_database_lu2; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE INDEX idx_r_step_database_lu2 ON r_step_database USING btree (id_database);


--
-- TOC entry 2154 (class 1259 OID 53541)
-- Dependencies: 180 180 180 2163
-- Name: idx_trans_attribute_lookup; Type: INDEX; Schema: public; Owner: administrador; Tablespace: 
--

CREATE UNIQUE INDEX idx_trans_attribute_lookup ON r_trans_attribute USING btree (id_transformation, code, nr);


--
-- TOC entry 2169 (class 0 OID 0)
-- Dependencies: 5
-- 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;


-- Completed on 2013-05-30 11:25:59 VET

--
--

