--
--


-- Started on 2023-05-29 12:50:08

SELECT pg_catalog.set_config('search_path', '', false);



--
-- TOC entry 214 (class 1259 OID 19767)
-- Name: alumnos; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.alumnos (
    al_cuen character varying(20) NOT NULL,
    al_apel_pa character varying(30) DEFAULT NULL::character varying,
    al_apel_ma character varying(30) DEFAULT NULL::character varying,
    al_nomb character varying(30) DEFAULT NULL::character varying,
    pl_clve_pl character varying(30) DEFAULT NULL::character varying,
    ep_clve_ep character varying(30) DEFAULT NULL::character varying,
    al_anio_ge integer,
    na_clve_na character varying(30) DEFAULT NULL::character varying,
    ci_clve_in character varying(30) DEFAULT NULL::character varying,
    ce_clve_eg character varying(30) DEFAULT NULL::character varying,
    al_ar19 character varying(1) DEFAULT NULL::character varying,
    al_semar19 integer,
    al_ar24 character varying(1) DEFAULT NULL::character varying,
    al_ulti_mo integer,
    al_sexo character varying(1) DEFAULT NULL::character varying,
    al_fech_na date,
    pr_clve_pr integer,
    al_naci_es character varying(45) DEFAULT NULL::character varying,
    flag character varying(1) DEFAULT NULL::character varying,
    al_fech_mo date,
    al_user_mo character varying(45) DEFAULT NULL::character varying,
    al_nuce character varying(1) DEFAULT NULL::character varying,
    al_baja_temp integer,
    al_pdo_baja integer,
    al_baja_insc integer,
    al_pdo_baja_insc integer,
    al_tipo_baja integer,
    al_pdo_tipo_baja integer
);


ALTER TABLE public.alumnos OWNER TO postgres;

--
-- TOC entry 215 (class 1259 OID 19786)
-- Name: asignatu; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.asignatu (
    as_clve_as character varying(9) DEFAULT NULL::character varying,
    as_nomb character varying(80) DEFAULT NULL::character varying,
    as_cred integer,
    as_cicl integer,
    as_tipo_cr integer,
    as_hora_te integer,
    as_hora_pr integer,
    as_teor_pr integer,
    as_num_par integer,
    as_fech_mo date,
    as_user_mo character varying(40) DEFAULT NULL::character varying,
    as_pass character varying(40) DEFAULT NULL::character varying
);


ALTER TABLE public.asignatu OWNER TO postgres;

--
-- TOC entry 216 (class 1259 OID 19794)
-- Name: asignaturaexamenes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.asignaturaexamenes (
    ae_clve_as integer NOT NULL,
    ae_gpos character varying(2) DEFAULT NULL::character varying,
    ae_prdo integer,
    ae_num_examen integer,
    ae_ciclo integer,
    ae_fecha_i date,
    ae_fecha_t date,
    ae_num_ent integer,
    ae_fecha_ent timestamp without time zone
);


ALTER TABLE public.asignaturaexamenes OWNER TO postgres;

--
-- TOC entry 217 (class 1259 OID 19799)
-- Name: carreras; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.carreras (
    ca_clve_ca integer,
    ca_nombre character varying(30) DEFAULT NULL::character varying
);


ALTER TABLE public.carreras OWNER TO postgres;

--
-- TOC entry 218 (class 1259 OID 19804)
-- Name: grupo; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.grupo (
    gp_clve_gp character varying(9) DEFAULT NULL::character varying,
    as_clve_as integer,
    se_clve_se integer,
    gp_prdo integer,
    pf_clve_pf character varying(30) DEFAULT NULL::character varying,
    rfc1 character varying(20) DEFAULT NULL::character varying,
    gp_clve_pf character varying(30) DEFAULT NULL::character varying,
    rfc2 character varying(20) DEFAULT NULL::character varying,
    gp_cupo integer,
    gp_insc integer,
    gp_turn integer,
    gp_tipo_ex character varying(4) DEFAULT NULL::character varying,
    gp_fech_mo timestamp without time zone,
    gp_user_mo character varying(20) DEFAULT NULL::character varying,
    gp_marca character varying(4) DEFAULT NULL::character varying,
    gp_nuce integer,
    gp_p1 double precision,
    gp_p2 double precision,
    gp_p3 double precision,
    gp_p4 double precision,
    gp_p5 double precision,
    gp_or1 double precision,
    gp_or2 double precision,
    gp_cf double precision
);


ALTER TABLE public.grupo OWNER TO postgres;

--
-- TOC entry 219 (class 1259 OID 19816)
-- Name: historia; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.historia (
    al_cuen character varying(20) DEFAULT NULL::character varying,
    ha_clve_gp character varying(20) DEFAULT NULL::character varying,
    ha_clve_as character varying(20) DEFAULT NULL::character varying,
    ha_tipo_ex character varying(20) DEFAULT NULL::character varying,
    ha_pdo character varying(20) DEFAULT NULL::character varying,
    ha_cali character varying(20) DEFAULT NULL::character varying,
    ha_foli character varying(20) DEFAULT NULL::character varying,
    ha_plan character varying(20) DEFAULT NULL::character varying
);


ALTER TABLE public.historia OWNER TO postgres;

--
-- TOC entry 220 (class 1259 OID 19828)
-- Name: inscripc; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.inscripc (
    al_cuen character varying(10) DEFAULT NULL::character varying,
    gp_clve_gp character varying(10) DEFAULT NULL::character varying,
    as_clve_as integer,
    se_clve_se integer,
    gp_prdo integer,
    gp_p1 integer,
    gp_p2 integer,
    gp_p3 integer,
    gp_p4 integer,
    gp_p5 integer,
    gp_promedio integer,
    gp_abp integer,
    gp_or1 integer,
    gp_or2 integer,
    gp_cf integer,
    gp_baja_temp integer,
    gp_exento integer,
    gp_repetidor integer,
    gp_aprobador integer,
    prot_gp_cf character varying(10) DEFAULT NULL::character varying,
    prot_gp_cf_fecha timestamp without time zone
);


ALTER TABLE public.inscripc OWNER TO postgres;

--
-- TOC entry 221 (class 1259 OID 19839)
-- Name: parametros; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.parametros (
    p_periodo double precision DEFAULT 0 NOT NULL,
    p_per_rec integer DEFAULT 0,
    p_secretario character varying(50) DEFAULT NULL::character varying,
    p_serv_esc character varying(50) DEFAULT NULL::character varying,
    p_reg_esc character varying(50) DEFAULT NULL::character varying,
    p_fecha_ins_1i timestamp without time zone,
    p_fecha_ins_1f timestamp without time zone,
    p_fecha_ins_2i timestamp without time zone,
    p_fecha_ins_2f timestamp without time zone,
    p_fecha_ins_3i timestamp without time zone,
    p_fecha_ins_3f timestamp without time zone,
    p_fecha_ins_4i timestamp without time zone,
    p_fecha_ins_4f timestamp without time zone,
    p_fecha_ins_5i timestamp without time zone,
    p_fecha_ins_5f timestamp without time zone,
    p_fecha_ins_ssi timestamp without time zone,
    p_fecha_ins_ssf timestamp without time zone,
    p_fecha_ins_epi timestamp without time zone,
    p_fecha_ins_epf timestamp without time zone
);


ALTER TABLE public.parametros OWNER TO postgres;

--
-- TOC entry 222 (class 1259 OID 19850)
-- Name: planes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.planes (
    pl_clve_pl integer,
    pl_nomb character varying(50) DEFAULT NULL::character varying,
    pl_prim_ge character varying(50) DEFAULT NULL::character varying,
    pl_carrera character varying(50) DEFAULT NULL::character varying,
    pl_plan character varying(50) DEFAULT NULL::character varying,
    pl_dura character varying(50) DEFAULT NULL::character varying,
    pl_cred_ob integer,
    pl_cred_op integer,
    pl_clve_or integer,
    pl_num_as integer,
    pl_tipo_plan character varying(5) DEFAULT NULL::character varying,
    niclave character varying(2) DEFAULT NULL::character varying
);


ALTER TABLE public.planes OWNER TO postgres;

--
-- TOC entry 223 (class 1259 OID 19861)
-- Name: planes_a; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.planes_a (
    as_clve_as character varying(4) NOT NULL,
    pl_clve_pl integer NOT NULL
);


ALTER TABLE public.planes_a OWNER TO postgres;

--
-- TOC entry 224 (class 1259 OID 19866)
-- Name: resumen; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.resumen (
    al_cuen character varying(10) DEFAULT NULL::character varying,
    pl_clve_pl integer,
    re_mats_re integer,
    re_mats_ac integer,
    re_mats_05 integer,
    re_mats_06 integer,
    re_mats_07 integer,
    re_mats_08 integer,
    re_mats_09 integer,
    re_mats_10 integer,
    re_mats_mb integer,
    re_mats_b integer,
    re_mats_s integer,
    re_mats_na integer,
    re_mats_np integer,
    re_mats_co integer,
    re_mats_or integer,
    re_mats_ex integer,
    re_mats_ob integer,
    re_mats_op integer,
    re_mats_5c integer,
    re_prdo_in integer,
    re_prdo_fi integer,
    re_vec_mats character varying(100) DEFAULT NULL::character varying,
    re_marca character varying(4) DEFAULT NULL::character varying,
    ci_clve_in integer,
    ce_clve_eg integer,
    al_gen integer,
    al_prdo_in integer
);


ALTER TABLE public.resumen OWNER TO postgres;

--
-- TOC entry 3423 (class 0 OID 19767)
-- Dependencies: 214
-- Data for Name: alumnos; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.alumnos (al_cuen, al_apel_pa, al_apel_ma, al_nomb, pl_clve_pl, ep_clve_ep, al_anio_ge, na_clve_na, ci_clve_in, ce_clve_eg, al_ar19, al_semar19, al_ar24, al_ulti_mo, al_sexo, al_fech_na, pr_clve_pr, al_naci_es, flag, al_fech_mo, al_user_mo, al_nuce, al_baja_temp, al_pdo_baja, al_baja_insc, al_pdo_baja_insc, al_tipo_baja, al_pdo_tipo_baja) FROM stdin;
\.


--
-- TOC entry 3424 (class 0 OID 19786)
-- Dependencies: 215
-- Data for Name: asignatu; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.asignatu (as_clve_as, as_nomb, as_cred, as_cicl, as_tipo_cr, as_hora_te, as_hora_pr, as_teor_pr, as_num_par, as_fech_mo, as_user_mo, as_pass) FROM stdin;
\.


--
-- TOC entry 3425 (class 0 OID 19794)
-- Dependencies: 216
-- Data for Name: asignaturaexamenes; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.asignaturaexamenes (ae_clve_as, ae_gpos, ae_prdo, ae_num_examen, ae_ciclo, ae_fecha_i, ae_fecha_t, ae_num_ent, ae_fecha_ent) FROM stdin;
\.


--
-- TOC entry 3426 (class 0 OID 19799)
-- Dependencies: 217
-- Data for Name: carreras; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.carreras (ca_clve_ca, ca_nombre) FROM stdin;
\.


--
-- TOC entry 3427 (class 0 OID 19804)
-- Dependencies: 218
-- Data for Name: grupo; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.grupo (gp_clve_gp, as_clve_as, se_clve_se, gp_prdo, pf_clve_pf, rfc1, gp_clve_pf, rfc2, gp_cupo, gp_insc, gp_turn, gp_tipo_ex, gp_fech_mo, gp_user_mo, gp_marca, gp_nuce, gp_p1, gp_p2, gp_p3, gp_p4, gp_p5, gp_or1, gp_or2, gp_cf) FROM stdin;
\.


--
-- TOC entry 3428 (class 0 OID 19816)
-- Dependencies: 219
-- Data for Name: historia; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.historia (al_cuen, ha_clve_gp, ha_clve_as, ha_tipo_ex, ha_pdo, ha_cali, ha_foli, ha_plan) FROM stdin;
\.


--
-- TOC entry 3429 (class 0 OID 19828)
-- Dependencies: 220
-- Data for Name: inscripc; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.inscripc (al_cuen, gp_clve_gp, as_clve_as, se_clve_se, gp_prdo, gp_p1, gp_p2, gp_p3, gp_p4, gp_p5, gp_promedio, gp_abp, gp_or1, gp_or2, gp_cf, gp_baja_temp, gp_exento, gp_repetidor, gp_aprobador, prot_gp_cf, prot_gp_cf_fecha) FROM stdin;
\.


--
-- TOC entry 3430 (class 0 OID 19839)
-- Dependencies: 221
-- Data for Name: parametros; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.parametros (p_periodo, p_per_rec, p_secretario, p_serv_esc, p_reg_esc, p_fecha_ins_1i, p_fecha_ins_1f, p_fecha_ins_2i, p_fecha_ins_2f, p_fecha_ins_3i, p_fecha_ins_3f, p_fecha_ins_4i, p_fecha_ins_4f, p_fecha_ins_5i, p_fecha_ins_5f, p_fecha_ins_ssi, p_fecha_ins_ssf, p_fecha_ins_epi, p_fecha_ins_epf) FROM stdin;
\.


--
-- TOC entry 3431 (class 0 OID 19850)
-- Dependencies: 222
-- Data for Name: planes; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.planes (pl_clve_pl, pl_nomb, pl_prim_ge, pl_carrera, pl_plan, pl_dura, pl_cred_ob, pl_cred_op, pl_clve_or, pl_num_as, pl_tipo_plan, niclave) FROM stdin;
\.


--
-- TOC entry 3432 (class 0 OID 19861)
-- Dependencies: 223
-- Data for Name: planes_a; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.planes_a (as_clve_as, pl_clve_pl) FROM stdin;
\.


--
-- TOC entry 3433 (class 0 OID 19866)
-- Dependencies: 224
-- Data for Name: resumen; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.resumen (al_cuen, pl_clve_pl, re_mats_re, re_mats_ac, re_mats_05, re_mats_06, re_mats_07, re_mats_08, re_mats_09, re_mats_10, re_mats_mb, re_mats_b, re_mats_s, re_mats_na, re_mats_np, re_mats_co, re_mats_or, re_mats_ex, re_mats_ob, re_mats_op, re_mats_5c, re_prdo_in, re_prdo_fi, re_vec_mats, re_marca, ci_clve_in, ce_clve_eg, al_gen, al_prdo_in) FROM stdin;
\.


--
-- TOC entry 3276 (class 2606 OID 19848)
-- Name: parametros parametros_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.parametros
    ADD CONSTRAINT parametros_pkey PRIMARY KEY (p_periodo);


--
-- TOC entry 3267 (class 1259 OID 19785)
-- Name: alumnos_al_cuen; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX alumnos_al_cuen ON public.alumnos USING btree (al_cuen);


--
-- TOC entry 3268 (class 1259 OID 19793)
-- Name: asignatu_as_clve_as; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX asignatu_as_clve_as ON public.asignatu USING btree (as_clve_as);


--
-- TOC entry 3269 (class 1259 OID 19835)
-- Name: asignaturaexamenes_ae_clve_as; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX asignaturaexamenes_ae_clve_as ON public.asignaturaexamenes USING btree (ae_clve_as);


--
-- TOC entry 3270 (class 1259 OID 19803)
-- Name: carreras_ca_clve_ca; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX carreras_ca_clve_ca ON public.carreras USING btree (ca_clve_ca);


--
-- TOC entry 3271 (class 1259 OID 19836)
-- Name: grupo_gp_clve_gp; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX grupo_gp_clve_gp ON public.grupo USING btree (gp_clve_gp);


--
-- TOC entry 3272 (class 1259 OID 19837)
-- Name: historia_al_cuen; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX historia_al_cuen ON public.historia USING btree (al_cuen);


--
-- TOC entry 3273 (class 1259 OID 19838)
-- Name: inscripc_al_cuen; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX inscripc_al_cuen ON public.inscripc USING btree (al_cuen);


--
-- TOC entry 3274 (class 1259 OID 19849)
-- Name: parametros_p_periodo; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX parametros_p_periodo ON public.parametros USING btree (p_periodo);


--
-- TOC entry 3278 (class 1259 OID 19864)
-- Name: planes_a_as_clve_as; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX planes_a_as_clve_as ON public.planes_a USING btree (as_clve_as);


--
-- TOC entry 3279 (class 1259 OID 19865)
-- Name: planes_a_pl_clve_pl; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX planes_a_pl_clve_pl ON public.planes_a USING btree (pl_clve_pl);


--
-- TOC entry 3277 (class 1259 OID 19860)
-- Name: planes_pl_clve_pl; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX planes_pl_clve_pl ON public.planes USING btree (pl_clve_pl);


--
-- TOC entry 3280 (class 1259 OID 19872)
-- Name: resumen_al_cuen; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX resumen_al_cuen ON public.resumen USING btree (al_cuen);


-- Completed on 2023-05-29 12:50:08

--
--

