--
-- PostgreSQL database cluster dump
--
\connect postgres
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET escape_string_warning = 'off';
--
-- Roles
--
CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN;
CREATE ROLE pryecto;
ALTER ROLE pryecto WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN PASSWORD 'md51b140ba9104bbd686409c43f4b835eff';
--
-- Database creation
--
REVOKE ALL ON DATABASE template1 FROM PUBLIC;
REVOKE ALL ON DATABASE template1 FROM postgres;
GRANT ALL ON DATABASE template1 TO postgres;
GRANT CONNECT ON DATABASE template1 TO PUBLIC;
\connect postgres
--
-- PostgreSQL database dump
--
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: adiestramientos; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE adiestramientos (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
"ID_cursos" integer NOT NULL,
fecha_inicio date,
fecha_fin date NOT NULL,
aceptado_sup date,
"aceptado_PyCG" date
);
ALTER TABLE public.adiestramientos OWNER TO pryecto;
--
-- Name: adiestramientos_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "adiestramientos_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."adiestramientos_ID_seq" OWNER TO pryecto;
--
-- Name: adiestramientos_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "adiestramientos_ID_seq" OWNED BY adiestramientos."ID";
--
-- Name: adiestramientos_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"adiestramientos_ID_seq"', 1, false);
--
-- Name: asignaciones; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE asignaciones (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
fecha_inicio date NOT NULL,
fecha_fin date,
causa character varying(50) NOT NULL,
"ID_proceso" integer NOT NULL
);
ALTER TABLE public.asignaciones OWNER TO pryecto;
--
-- Name: asignacion_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "asignacion_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."asignacion_ID_seq" OWNER TO pryecto;
--
-- Name: asignacion_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "asignacion_ID_seq" OWNED BY asignaciones."ID";
--
-- Name: asignacion_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"asignacion_ID_seq"', 1, false);
--
-- Name: comisiones; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE comisiones (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
fecha_inicio date NOT NULL,
fecha_fin date,
causa character varying(50) NOT NULL,
empresa character varying(50) NOT NULL
);
ALTER TABLE public.comisiones OWNER TO pryecto;
--
-- Name: comisiones_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "comisiones_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."comisiones_ID_seq" OWNER TO pryecto;
--
-- Name: comisiones_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "comisiones_ID_seq" OWNED BY comisiones."ID";
--
-- Name: comisiones_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"comisiones_ID_seq"', 1, false);
--
-- Name: cursosext; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE cursosext (
"ID" integer NOT NULL,
nombre character varying(50) NOT NULL,
tipo character varying(30) NOT NULL,
clase character varying(30) NOT NULL
);
ALTER TABLE public.cursosext OWNER TO pryecto;
--
-- Name: cursosext_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "cursosext_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."cursosext_ID_seq" OWNER TO pryecto;
--
-- Name: cursosext_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "cursosext_ID_seq" OWNED BY cursosext."ID";
--
-- Name: cursosext_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"cursosext_ID_seq"', 1, false);
--
-- Name: cursosint; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE cursosint (
"ID" integer NOT NULL,
nombre character varying(50) NOT NULL,
tipo character varying(30) NOT NULL,
clase character varying(30) NOT NULL,
proceso character varying(30) NOT NULL,
nivel_capacitacion character varying(30) NOT NULL
);
ALTER TABLE public.cursosint OWNER TO pryecto;
--
-- Name: cursosint_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "cursosint_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."cursosint_ID_seq" OWNER TO pryecto;
--
-- Name: cursosint_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "cursosint_ID_seq" OWNED BY cursosint."ID";
--
-- Name: cursosint_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"cursosint_ID_seq"', 1, false);
--
-- Name: expediente; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE expediente (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
"ID_cursos" integer NOT NULL,
fecha_inicio date NOT NULL,
fecha_fin date NOT NULL,
fecha_certificacion date NOT NULL,
calificacion character varying(4)
);
ALTER TABLE public.expediente OWNER TO pryecto;
--
-- Name: expediente_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "expediente_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."expediente_ID_seq" OWNER TO pryecto;
--
-- Name: expediente_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "expediente_ID_seq" OWNED BY expediente."ID";
--
-- Name: expediente_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"expediente_ID_seq"', 1, false);
--
-- Name: indicadores; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE indicadores (
"CI" integer NOT NULL,
indicador character varying(30) NOT NULL
);
ALTER TABLE public.indicadores OWNER TO pryecto;
--
-- Name: pasantes; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE pasantes (
indicador_personal character varying(30) NOT NULL,
"desempeño" character varying(200) NOT NULL,
tutor character varying(30) NOT NULL
);
ALTER TABLE public.pasantes OWNER TO pryecto;
--
-- Name: permisos; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE permisos (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
fecha_inicio date NOT NULL,
fecha_fin date,
causa character varying(50)
);
ALTER TABLE public.permisos OWNER TO pryecto;
--
-- Name: permisos_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "permisos_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."permisos_ID_seq" OWNER TO pryecto;
--
-- Name: permisos_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "permisos_ID_seq" OWNED BY permisos."ID";
--
-- Name: permisos_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"permisos_ID_seq"', 1, false);
--
-- Name: persona; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE persona (
"CI_indicadores" integer NOT NULL,
nombre_1 character varying(30) NOT NULL,
nombre_2 character varying(30),
apellido_1 character varying(30) NOT NULL,
apellido_2 character varying(30),
fecha_nacimiento date NOT NULL,
lugar_nacimiento character varying(100) NOT NULL,
direccion character varying(100) NOT NULL,
telf_celular character varying(15),
telf_habitacion character varying(15),
correo character varying(60)
);
ALTER TABLE public.persona OWNER TO pryecto;
--
-- Name: personal; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE personal (
"ID" integer NOT NULL,
indicador_indicadores character varying(30) NOT NULL,
fecha_inicio date NOT NULL,
causa_inicio character varying(50) NOT NULL,
fecha_fin date,
causa_fin character varying(50),
"ID_proceso" integer
);
ALTER TABLE public.personal OWNER TO pryecto;
--
-- Name: personal_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "personal_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."personal_ID_seq" OWNER TO pryecto;
--
-- Name: personal_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "personal_ID_seq" OWNED BY personal."ID";
--
-- Name: personal_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"personal_ID_seq"', 1, false);
--
-- Name: procesos; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE procesos (
"ID" integer NOT NULL,
nombre character varying(30) NOT NULL,
region character varying(30) NOT NULL,
lider character varying(30),
supervisor character varying(30),
fecha date NOT NULL
);
ALTER TABLE public.procesos OWNER TO pryecto;
--
-- Name: procesos_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "procesos_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."procesos_ID_seq" OWNER TO pryecto;
--
-- Name: procesos_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "procesos_ID_seq" OWNED BY procesos."ID";
--
-- Name: procesos_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"procesos_ID_seq"', 1, false);
--
-- Name: reposos; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE reposos (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
fecha_inicio date NOT NULL,
fecha_fin date,
causa character varying(50) NOT NULL
);
ALTER TABLE public.reposos OWNER TO pryecto;
--
-- Name: reposos_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "reposos_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."reposos_ID_seq" OWNER TO pryecto;
--
-- Name: reposos_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "reposos_ID_seq" OWNED BY reposos."ID";
--
-- Name: reposos_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"reposos_ID_seq"', 1, false);
--
-- Name: trasnferencias; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE trasnferencias (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
fecha date NOT NULL,
causa character varying(50) NOT NULL,
"ID_proceso" integer NOT NULL
);
ALTER TABLE public.trasnferencias OWNER TO pryecto;
--
-- Name: trasnferencias_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "trasnferencias_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."trasnferencias_ID_seq" OWNER TO pryecto;
--
-- Name: trasnferencias_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "trasnferencias_ID_seq" OWNED BY trasnferencias."ID";
--
-- Name: trasnferencias_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"trasnferencias_ID_seq"', 1, false);
--
-- Name: vacaciones; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE vacaciones (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
fecha_inicio date NOT NULL,
fecha_fin date NOT NULL,
aceptado_supervisor date,
fechareal_inicio date,
fechareal_fin date
);
ALTER TABLE public.vacaciones OWNER TO pryecto;
--
-- Name: vacaciones_ID_seq; Type: SEQUENCE; Schema: public; Owner: pryecto
--
CREATE SEQUENCE "vacaciones_ID_seq"
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public."vacaciones_ID_seq" OWNER TO pryecto;
--
-- Name: vacaciones_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pryecto
--
ALTER SEQUENCE "vacaciones_ID_seq" OWNED BY vacaciones."ID";
--
-- Name: vacaciones_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: pryecto
--
SELECT pg_catalog.setval('"vacaciones_ID_seq"', 1, false);
--
-- Name: vacacionespend; Type: TABLE; Schema: public; Owner: pryecto; Tablespace:
--
CREATE TABLE vacacionespend (
"ID" integer NOT NULL,
indicador_personal character varying(30) NOT NULL,
por_disfrutar date,
por_cobrar date
);
ALTER TABLE public.vacacionespend OWNER TO pryecto;
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE adiestramientos ALTER COLUMN "ID" SET DEFAULT nextval('"adiestramientos_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE asignaciones ALTER COLUMN "ID" SET DEFAULT nextval('"asignacion_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE comisiones ALTER COLUMN "ID" SET DEFAULT nextval('"comisiones_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE cursosext ALTER COLUMN "ID" SET DEFAULT nextval('"cursosext_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE cursosint ALTER COLUMN "ID" SET DEFAULT nextval('"cursosint_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE expediente ALTER COLUMN "ID" SET DEFAULT nextval('"expediente_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE permisos ALTER COLUMN "ID" SET DEFAULT nextval('"permisos_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE personal ALTER COLUMN "ID" SET DEFAULT nextval('"personal_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE procesos ALTER COLUMN "ID" SET DEFAULT nextval('"procesos_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE reposos ALTER COLUMN "ID" SET DEFAULT nextval('"reposos_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE trasnferencias ALTER COLUMN "ID" SET DEFAULT nextval('"trasnferencias_ID_seq"'::regclass);
--
-- Name: ID; Type: DEFAULT; Schema: public; Owner: pryecto
--
ALTER TABLE vacaciones ALTER COLUMN "ID" SET DEFAULT nextval('"vacaciones_ID_seq"'::regclass);
--
-- Data for Name: adiestramientos; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY adiestramientos ("ID", indicador_personal, "ID_cursos", fecha_inicio, fecha_fin, aceptado_sup, "aceptado_PyCG") FROM stdin;
\.
--
-- Data for Name: asignaciones; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY asignaciones ("ID", indicador_personal, fecha_inicio, fecha_fin, causa, "ID_proceso") FROM stdin;
\.
--
-- Data for Name: comisiones; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY comisiones ("ID", indicador_personal, fecha_inicio, fecha_fin, causa, empresa) FROM stdin;
\.
--
-- Data for Name: cursosext; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY cursosext ("ID", nombre, tipo, clase) FROM stdin;
\.
--
-- Data for Name: cursosint; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY cursosint ("ID", nombre, tipo, clase, proceso, nivel_capacitacion) FROM stdin;
\.
--
-- Data for Name: expediente; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY expediente ("ID", indicador_personal, "ID_cursos", fecha_inicio, fecha_fin, fecha_certificacion, calificacion) FROM stdin;
\.
--
-- Data for Name: indicadores; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY indicadores ("CI", indicador) FROM stdin;
\.
--
-- Data for Name: pasantes; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY pasantes (indicador_personal, "desempeño", tutor) FROM stdin;
\.
--
-- Data for Name: permisos; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY permisos ("ID", indicador_personal, fecha_inicio, fecha_fin, causa) FROM stdin;
\.
--
-- Data for Name: persona; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY persona ("CI_indicadores", nombre_1, nombre_2, apellido_1, apellido_2, fecha_nacimiento, lugar_nacimiento, direccion, telf_celular, telf_habitacion, correo) FROM stdin;
\.
--
-- Data for Name: personal; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY personal ("ID", indicador_indicadores, fecha_inicio, causa_inicio, fecha_fin, causa_fin, "ID_proceso") FROM stdin;
\.
--
-- Data for Name: procesos; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY procesos ("ID", nombre, region, lider, supervisor, fecha) FROM stdin;
\.
--
-- Data for Name: reposos; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY reposos ("ID", indicador_personal, fecha_inicio, fecha_fin, causa) FROM stdin;
\.
--
-- Data for Name: trasnferencias; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY trasnferencias ("ID", indicador_personal, fecha, causa, "ID_proceso") FROM stdin;
\.
--
-- Data for Name: vacaciones; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY vacaciones ("ID", indicador_personal, fecha_inicio, fecha_fin, aceptado_supervisor, fechareal_inicio, fechareal_fin) FROM stdin;
\.
--
-- Data for Name: vacacionespend; Type: TABLE DATA; Schema: public; Owner: pryecto
--
COPY vacacionespend ("ID", indicador_personal, por_disfrutar, por_cobrar) FROM stdin;
\.
--
-- Name: adiestramientos_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY adiestramientos
ADD CONSTRAINT adiestramientos_pkey PRIMARY KEY ("ID");
--
-- Name: asignacion_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY asignaciones
ADD CONSTRAINT asignacion_pkey PRIMARY KEY ("ID");
--
-- Name: comisiones_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY comisiones
ADD CONSTRAINT comisiones_pkey PRIMARY KEY ("ID");
--
-- Name: cursosext_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY cursosext
ADD CONSTRAINT cursosext_pkey PRIMARY KEY ("ID");
--
-- Name: cursosint_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY cursosint
ADD CONSTRAINT cursosint_pkey PRIMARY KEY ("ID");
--
-- Name: expediente_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY expediente
ADD CONSTRAINT expediente_pkey PRIMARY KEY ("ID");
--
-- Name: indicadores_indicador_key; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY indicadores
ADD CONSTRAINT indicadores_indicador_key UNIQUE (indicador);
--
-- Name: indicadores_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY indicadores
ADD CONSTRAINT indicadores_pkey PRIMARY KEY ("CI");
--
-- Name: pasantes_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY pasantes
ADD CONSTRAINT pasantes_pkey PRIMARY KEY (indicador_personal);
--
-- Name: permisos_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY permisos
ADD CONSTRAINT permisos_pkey PRIMARY KEY ("ID");
--
-- Name: persona_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY persona
ADD CONSTRAINT persona_pkey PRIMARY KEY ("CI_indicadores");
--
-- Name: personal_indicador_indicadores_key; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY personal
ADD CONSTRAINT personal_indicador_indicadores_key UNIQUE (indicador_indicadores);
--
-- Name: personal_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY personal
ADD CONSTRAINT personal_pkey PRIMARY KEY ("ID");
--
-- Name: procesos_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY procesos
ADD CONSTRAINT procesos_pkey PRIMARY KEY ("ID");
--
-- Name: reposos_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY reposos
ADD CONSTRAINT reposos_pkey PRIMARY KEY ("ID");
--
-- Name: trasnferencias_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY trasnferencias
ADD CONSTRAINT trasnferencias_pkey PRIMARY KEY ("ID");
--
-- Name: vacaciones_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY vacaciones
ADD CONSTRAINT vacaciones_pkey PRIMARY KEY ("ID");
--
-- Name: vacacionespend_pkey; Type: CONSTRAINT; Schema: public; Owner: pryecto; Tablespace:
--
ALTER TABLE ONLY vacacionespend
ADD CONSTRAINT vacacionespend_pkey PRIMARY KEY ("ID");
--
-- Name: adiestramientos_ID_cursos_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY adiestramientos
ADD CONSTRAINT "adiestramientos_ID_cursos_fkey" FOREIGN KEY ("ID_cursos") REFERENCES cursosint("ID") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: adiestramientos_ID_cursos_fkey1; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY adiestramientos
ADD CONSTRAINT "adiestramientos_ID_cursos_fkey1" FOREIGN KEY ("ID_cursos") REFERENCES cursosext("ID") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: adiestramientos_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY adiestramientos
ADD CONSTRAINT adiestramientos_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asignacion_ID_proceso_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY asignaciones
ADD CONSTRAINT "asignacion_ID_proceso_fkey" FOREIGN KEY ("ID_proceso") REFERENCES procesos("ID") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: asignacion_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY asignaciones
ADD CONSTRAINT asignacion_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: comisiones_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY comisiones
ADD CONSTRAINT comisiones_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: expediente_ID_cursos_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY expediente
ADD CONSTRAINT "expediente_ID_cursos_fkey" FOREIGN KEY ("ID_cursos") REFERENCES cursosint("ID") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: expediente_ID_cursos_fkey1; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY expediente
ADD CONSTRAINT "expediente_ID_cursos_fkey1" FOREIGN KEY ("ID_cursos") REFERENCES cursosext("ID") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: expediente_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY expediente
ADD CONSTRAINT expediente_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: pasantes_indicador_persona_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY pasantes
ADD CONSTRAINT pasantes_indicador_persona_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: pasantes_tutor_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY pasantes
ADD CONSTRAINT pasantes_tutor_fkey FOREIGN KEY (tutor) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: permisos_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY permisos
ADD CONSTRAINT permisos_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: persona_CI_indicadores_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY persona
ADD CONSTRAINT "persona_CI_indicadores_fkey" FOREIGN KEY ("CI_indicadores") REFERENCES indicadores("CI") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: personal_ID_proceso_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY personal
ADD CONSTRAINT "personal_ID_proceso_fkey" FOREIGN KEY ("ID_proceso") REFERENCES procesos("ID") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: personal_indicador_indicadores_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY personal
ADD CONSTRAINT personal_indicador_indicadores_fkey FOREIGN KEY (indicador_indicadores) REFERENCES indicadores(indicador) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: procesos_lider_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY procesos
ADD CONSTRAINT procesos_lider_fkey FOREIGN KEY (lider) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: procesos_supervisor_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY procesos
ADD CONSTRAINT procesos_supervisor_fkey FOREIGN KEY (supervisor) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: reposos_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY reposos
ADD CONSTRAINT reposos_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: trasnferencias_ID_proceso_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY trasnferencias
ADD CONSTRAINT "trasnferencias_ID_proceso_fkey" FOREIGN KEY ("ID_proceso") REFERENCES procesos("ID") ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: trasnferencias_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY trasnferencias
ADD CONSTRAINT trasnferencias_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: vacaciones_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY vacaciones
ADD CONSTRAINT vacaciones_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: vacacionespend_indicador_personal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pryecto
--
ALTER TABLE ONLY vacacionespend
ADD CONSTRAINT vacacionespend_indicador_personal_fkey FOREIGN KEY (indicador_personal) REFERENCES personal(indicador_indicadores) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- 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;
--
-- PostgreSQL database dump complete
--
\connect template1
--
-- PostgreSQL database dump
--
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
--
-- Name: template1; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON DATABASE template1 IS 'default template database';
--
-- 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;
--
-- PostgreSQL database dump complete
--
--
-- PostgreSQL database cluster dump complete
--