|
@@ -0,0 +1,625 @@
|
|
1
|
+-- phpMyAdmin SQL Dump
|
|
2
|
+-- version 4.8.4
|
|
3
|
+-- https://www.phpmyadmin.net/
|
|
4
|
+--
|
|
5
|
+-- Host: localhost
|
|
6
|
+-- Generation Time: Jul 01, 2020 at 05:02 PM
|
|
7
|
+-- Server version: 8.0.13
|
|
8
|
+-- PHP Version: 7.3.11
|
|
9
|
+
|
|
10
|
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
11
|
+SET AUTOCOMMIT = 0;
|
|
12
|
+START TRANSACTION;
|
|
13
|
+SET time_zone = "+00:00";
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
17
|
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
18
|
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
19
|
+/*!40101 SET NAMES utf8mb4 */;
|
|
20
|
+
|
|
21
|
+--
|
|
22
|
+-- Database: `registro_escolar`
|
|
23
|
+--
|
|
24
|
+
|
|
25
|
+-- --------------------------------------------------------
|
|
26
|
+
|
|
27
|
+--
|
|
28
|
+-- Table structure for table `administracion`
|
|
29
|
+--
|
|
30
|
+
|
|
31
|
+CREATE TABLE `administracion` (
|
|
32
|
+ `user_id` int(11) NOT NULL,
|
|
33
|
+ `posicion` varchar(100) NOT NULL,
|
|
34
|
+ `otro` varchar(100) NOT NULL
|
|
35
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
36
|
+
|
|
37
|
+-- --------------------------------------------------------
|
|
38
|
+
|
|
39
|
+--
|
|
40
|
+-- Table structure for table `asistencia`
|
|
41
|
+--
|
|
42
|
+
|
|
43
|
+CREATE TABLE `asistencia` (
|
|
44
|
+ `id` int(11) NOT NULL,
|
|
45
|
+ `matricula_id` int(11) NOT NULL,
|
|
46
|
+ `fecha` date NOT NULL,
|
|
47
|
+ `valor` int(11) NOT NULL
|
|
48
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
49
|
+
|
|
50
|
+-- --------------------------------------------------------
|
|
51
|
+
|
|
52
|
+--
|
|
53
|
+-- Table structure for table `cursos`
|
|
54
|
+--
|
|
55
|
+
|
|
56
|
+CREATE TABLE `cursos` (
|
|
57
|
+ `id` int(11) NOT NULL,
|
|
58
|
+ `codigo` varchar(12) NOT NULL,
|
|
59
|
+ `titulo` varchar(100) NOT NULL,
|
|
60
|
+ `grado` varchar(30) NOT NULL,
|
|
61
|
+ `descripcion` varchar(200) NOT NULL
|
|
62
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
63
|
+
|
|
64
|
+-- --------------------------------------------------------
|
|
65
|
+
|
|
66
|
+--
|
|
67
|
+-- Table structure for table `enfermeras`
|
|
68
|
+--
|
|
69
|
+
|
|
70
|
+CREATE TABLE `enfermeras` (
|
|
71
|
+ `user_id` int(11) NOT NULL,
|
|
72
|
+ `especialidad` varchar(100) NOT NULL,
|
|
73
|
+ `otro` varchar(100) NOT NULL
|
|
74
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
75
|
+
|
|
76
|
+-- --------------------------------------------------------
|
|
77
|
+
|
|
78
|
+--
|
|
79
|
+-- Table structure for table `estatus`
|
|
80
|
+--
|
|
81
|
+
|
|
82
|
+CREATE TABLE `estatus` (
|
|
83
|
+ `id` int(11) NOT NULL,
|
|
84
|
+ `user_id` int(11) NOT NULL,
|
|
85
|
+ `estatus` varchar(100) NOT NULL,
|
|
86
|
+ `fecha` datetime NOT NULL,
|
|
87
|
+ `comentarios` varchar(300) NOT NULL
|
|
88
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
89
|
+
|
|
90
|
+-- --------------------------------------------------------
|
|
91
|
+
|
|
92
|
+--
|
|
93
|
+-- Table structure for table `estudiantes`
|
|
94
|
+--
|
|
95
|
+
|
|
96
|
+CREATE TABLE `estudiantes` (
|
|
97
|
+ `user_id` int(11) NOT NULL,
|
|
98
|
+ `grado` int(11) NOT NULL,
|
|
99
|
+ `educacion_especial` tinyint(1) NOT NULL
|
|
100
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
101
|
+
|
|
102
|
+-- --------------------------------------------------------
|
|
103
|
+
|
|
104
|
+--
|
|
105
|
+-- Table structure for table `evaluaciones`
|
|
106
|
+--
|
|
107
|
+
|
|
108
|
+CREATE TABLE `evaluaciones` (
|
|
109
|
+ `id` int(11) NOT NULL,
|
|
110
|
+ `oferta_id` int(11) NOT NULL,
|
|
111
|
+ `tipo` int(11) NOT NULL,
|
|
112
|
+ `valor` int(11) NOT NULL,
|
|
113
|
+ `fecha` date NOT NULL
|
|
114
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
115
|
+
|
|
116
|
+-- --------------------------------------------------------
|
|
117
|
+
|
|
118
|
+--
|
|
119
|
+-- Table structure for table `facultad`
|
|
120
|
+--
|
|
121
|
+
|
|
122
|
+CREATE TABLE `facultad` (
|
|
123
|
+ `user_id` int(11) NOT NULL,
|
|
124
|
+ `especialidad` varchar(200) NOT NULL,
|
|
125
|
+ `educacion_especial` tinyint(1) NOT NULL
|
|
126
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
127
|
+
|
|
128
|
+-- --------------------------------------------------------
|
|
129
|
+
|
|
130
|
+--
|
|
131
|
+-- Table structure for table `facultad_ofrece`
|
|
132
|
+--
|
|
133
|
+
|
|
134
|
+CREATE TABLE `facultad_ofrece` (
|
|
135
|
+ `id` int(11) NOT NULL,
|
|
136
|
+ `oferta_id` int(11) NOT NULL,
|
|
137
|
+ `facultad_id` int(11) NOT NULL,
|
|
138
|
+ `porciento` int(11) NOT NULL
|
|
139
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
140
|
+
|
|
141
|
+-- --------------------------------------------------------
|
|
142
|
+
|
|
143
|
+--
|
|
144
|
+-- Table structure for table `madres`
|
|
145
|
+--
|
|
146
|
+
|
|
147
|
+CREATE TABLE `madres` (
|
|
148
|
+ `user_id` int(11) NOT NULL,
|
|
149
|
+ `otro1` varchar(100) NOT NULL,
|
|
150
|
+ `otro2` varchar(100) NOT NULL
|
|
151
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
152
|
+
|
|
153
|
+-- --------------------------------------------------------
|
|
154
|
+
|
|
155
|
+--
|
|
156
|
+-- Table structure for table `madres_estudiantes`
|
|
157
|
+--
|
|
158
|
+
|
|
159
|
+CREATE TABLE `madres_estudiantes` (
|
|
160
|
+ `id` int(11) NOT NULL,
|
|
161
|
+ `estudiante_id` int(11) NOT NULL,
|
|
162
|
+ `madre_id` int(11) NOT NULL,
|
|
163
|
+ `relacion` varchar(40) NOT NULL
|
|
164
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
165
|
+
|
|
166
|
+-- --------------------------------------------------------
|
|
167
|
+
|
|
168
|
+--
|
|
169
|
+-- Table structure for table `matricula`
|
|
170
|
+--
|
|
171
|
+
|
|
172
|
+CREATE TABLE `matricula` (
|
|
173
|
+ `id` int(11) NOT NULL,
|
|
174
|
+ `estudiante_id` int(11) NOT NULL,
|
|
175
|
+ `oferta_id` int(11) NOT NULL
|
|
176
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
177
|
+
|
|
178
|
+-- --------------------------------------------------------
|
|
179
|
+
|
|
180
|
+--
|
|
181
|
+-- Table structure for table `mensajes`
|
|
182
|
+--
|
|
183
|
+
|
|
184
|
+CREATE TABLE `mensajes` (
|
|
185
|
+ `id` int(11) NOT NULL,
|
|
186
|
+ `fecha` datetime NOT NULL,
|
|
187
|
+ `remitente` int(11) NOT NULL,
|
|
188
|
+ `destinatarios` blob NOT NULL,
|
|
189
|
+ `mensaje` blob NOT NULL
|
|
190
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
191
|
+
|
|
192
|
+-- --------------------------------------------------------
|
|
193
|
+
|
|
194
|
+--
|
|
195
|
+-- Table structure for table `notas`
|
|
196
|
+--
|
|
197
|
+
|
|
198
|
+CREATE TABLE `notas` (
|
|
199
|
+ `id` int(11) NOT NULL,
|
|
200
|
+ `evaluacion_id` int(11) NOT NULL,
|
|
201
|
+ `estudiante_id` int(11) NOT NULL,
|
|
202
|
+ `valor` int(11) NOT NULL
|
|
203
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
204
|
+
|
|
205
|
+-- --------------------------------------------------------
|
|
206
|
+
|
|
207
|
+--
|
|
208
|
+-- Table structure for table `oferta`
|
|
209
|
+--
|
|
210
|
+
|
|
211
|
+CREATE TABLE `oferta` (
|
|
212
|
+ `id` int(11) NOT NULL,
|
|
213
|
+ `curso_id` int(11) NOT NULL,
|
|
214
|
+ `semestre` varchar(20) NOT NULL,
|
|
215
|
+ `horario` varchar(100) NOT NULL
|
|
216
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
217
|
+
|
|
218
|
+-- --------------------------------------------------------
|
|
219
|
+
|
|
220
|
+--
|
|
221
|
+-- Table structure for table `transcripciones`
|
|
222
|
+--
|
|
223
|
+
|
|
224
|
+CREATE TABLE `transcripciones` (
|
|
225
|
+ `id` int(11) NOT NULL,
|
|
226
|
+ `estudiante_id` int(11) NOT NULL,
|
|
227
|
+ `administracion_id` int(11) NOT NULL,
|
|
228
|
+ `fecha` datetime NOT NULL,
|
|
229
|
+ `archivo` varchar(100) NOT NULL
|
|
230
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
231
|
+
|
|
232
|
+-- --------------------------------------------------------
|
|
233
|
+
|
|
234
|
+--
|
|
235
|
+-- Table structure for table `usuarios`
|
|
236
|
+--
|
|
237
|
+
|
|
238
|
+CREATE TABLE `usuarios` (
|
|
239
|
+ `id` int(11) NOT NULL,
|
|
240
|
+ `nombres` varchar(100) NOT NULL,
|
|
241
|
+ `apellidos` varchar(100) NOT NULL,
|
|
242
|
+ `email` varchar(100) NOT NULL,
|
|
243
|
+ `username` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
|
|
244
|
+ `password` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
|
|
245
|
+ `fecha_nacimiento` date NOT NULL,
|
|
246
|
+ `direccion1` varchar(200) NOT NULL,
|
|
247
|
+ `direccion2` varchar(200) NOT NULL,
|
|
248
|
+ `ciudad` varchar(100) NOT NULL,
|
|
249
|
+ `pais` varchar(100) NOT NULL,
|
|
250
|
+ `zipcode` varchar(16) NOT NULL,
|
|
251
|
+ `telefono1` varchar(20) NOT NULL,
|
|
252
|
+ `telefono2` varchar(20) NOT NULL,
|
|
253
|
+ `genero` varchar(30) NOT NULL
|
|
254
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
255
|
+
|
|
256
|
+-- --------------------------------------------------------
|
|
257
|
+
|
|
258
|
+--
|
|
259
|
+-- Table structure for table `visitas_enfermeria`
|
|
260
|
+--
|
|
261
|
+
|
|
262
|
+CREATE TABLE `visitas_enfermeria` (
|
|
263
|
+ `id` int(11) NOT NULL,
|
|
264
|
+ `estudiante_id` int(11) NOT NULL,
|
|
265
|
+ `enfermera_id` int(11) NOT NULL,
|
|
266
|
+ `razon` varchar(100) NOT NULL,
|
|
267
|
+ `acciones` varchar(500) NOT NULL
|
|
268
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
269
|
+
|
|
270
|
+-- --------------------------------------------------------
|
|
271
|
+
|
|
272
|
+--
|
|
273
|
+-- Table structure for table `visitas_oficina`
|
|
274
|
+--
|
|
275
|
+
|
|
276
|
+CREATE TABLE `visitas_oficina` (
|
|
277
|
+ `id` int(11) NOT NULL,
|
|
278
|
+ `estudiante_id` int(11) NOT NULL,
|
|
279
|
+ `administradora_id` int(11) NOT NULL,
|
|
280
|
+ `razon` varchar(100) NOT NULL,
|
|
281
|
+ `acciones` varchar(500) NOT NULL
|
|
282
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
283
|
+
|
|
284
|
+--
|
|
285
|
+-- Indexes for dumped tables
|
|
286
|
+--
|
|
287
|
+
|
|
288
|
+--
|
|
289
|
+-- Indexes for table `administracion`
|
|
290
|
+--
|
|
291
|
+ALTER TABLE `administracion`
|
|
292
|
+ ADD KEY `user_id` (`user_id`);
|
|
293
|
+
|
|
294
|
+--
|
|
295
|
+-- Indexes for table `asistencia`
|
|
296
|
+--
|
|
297
|
+ALTER TABLE `asistencia`
|
|
298
|
+ ADD PRIMARY KEY (`id`),
|
|
299
|
+ ADD KEY `matricula_id` (`matricula_id`);
|
|
300
|
+
|
|
301
|
+--
|
|
302
|
+-- Indexes for table `cursos`
|
|
303
|
+--
|
|
304
|
+ALTER TABLE `cursos`
|
|
305
|
+ ADD PRIMARY KEY (`id`);
|
|
306
|
+
|
|
307
|
+--
|
|
308
|
+-- Indexes for table `enfermeras`
|
|
309
|
+--
|
|
310
|
+ALTER TABLE `enfermeras`
|
|
311
|
+ ADD KEY `user_id` (`user_id`);
|
|
312
|
+
|
|
313
|
+--
|
|
314
|
+-- Indexes for table `estatus`
|
|
315
|
+--
|
|
316
|
+ALTER TABLE `estatus`
|
|
317
|
+ ADD PRIMARY KEY (`id`),
|
|
318
|
+ ADD KEY `user_id` (`user_id`);
|
|
319
|
+
|
|
320
|
+--
|
|
321
|
+-- Indexes for table `estudiantes`
|
|
322
|
+--
|
|
323
|
+ALTER TABLE `estudiantes`
|
|
324
|
+ ADD KEY `user_id` (`user_id`);
|
|
325
|
+
|
|
326
|
+--
|
|
327
|
+-- Indexes for table `evaluaciones`
|
|
328
|
+--
|
|
329
|
+ALTER TABLE `evaluaciones`
|
|
330
|
+ ADD PRIMARY KEY (`id`),
|
|
331
|
+ ADD KEY `oferta_id` (`oferta_id`);
|
|
332
|
+
|
|
333
|
+--
|
|
334
|
+-- Indexes for table `facultad`
|
|
335
|
+--
|
|
336
|
+ALTER TABLE `facultad`
|
|
337
|
+ ADD KEY `user_id` (`user_id`);
|
|
338
|
+
|
|
339
|
+--
|
|
340
|
+-- Indexes for table `facultad_ofrece`
|
|
341
|
+--
|
|
342
|
+ALTER TABLE `facultad_ofrece`
|
|
343
|
+ ADD PRIMARY KEY (`id`),
|
|
344
|
+ ADD KEY `oferta_id` (`oferta_id`),
|
|
345
|
+ ADD KEY `facultad_id` (`facultad_id`);
|
|
346
|
+
|
|
347
|
+--
|
|
348
|
+-- Indexes for table `madres`
|
|
349
|
+--
|
|
350
|
+ALTER TABLE `madres`
|
|
351
|
+ ADD KEY `user_id` (`user_id`);
|
|
352
|
+
|
|
353
|
+--
|
|
354
|
+-- Indexes for table `madres_estudiantes`
|
|
355
|
+--
|
|
356
|
+ALTER TABLE `madres_estudiantes`
|
|
357
|
+ ADD PRIMARY KEY (`id`),
|
|
358
|
+ ADD KEY `estudiante_id` (`estudiante_id`),
|
|
359
|
+ ADD KEY `madre_id` (`madre_id`);
|
|
360
|
+
|
|
361
|
+--
|
|
362
|
+-- Indexes for table `matricula`
|
|
363
|
+--
|
|
364
|
+ALTER TABLE `matricula`
|
|
365
|
+ ADD PRIMARY KEY (`id`),
|
|
366
|
+ ADD KEY `estudiante_id` (`estudiante_id`),
|
|
367
|
+ ADD KEY `oferta_id` (`oferta_id`);
|
|
368
|
+
|
|
369
|
+--
|
|
370
|
+-- Indexes for table `mensajes`
|
|
371
|
+--
|
|
372
|
+ALTER TABLE `mensajes`
|
|
373
|
+ ADD PRIMARY KEY (`id`),
|
|
374
|
+ ADD KEY `remitente` (`remitente`);
|
|
375
|
+
|
|
376
|
+--
|
|
377
|
+-- Indexes for table `notas`
|
|
378
|
+--
|
|
379
|
+ALTER TABLE `notas`
|
|
380
|
+ ADD PRIMARY KEY (`id`),
|
|
381
|
+ ADD KEY `evaluacion_id` (`evaluacion_id`),
|
|
382
|
+ ADD KEY `estudiante_id` (`estudiante_id`);
|
|
383
|
+
|
|
384
|
+--
|
|
385
|
+-- Indexes for table `oferta`
|
|
386
|
+--
|
|
387
|
+ALTER TABLE `oferta`
|
|
388
|
+ ADD PRIMARY KEY (`id`),
|
|
389
|
+ ADD KEY `curso_id` (`curso_id`);
|
|
390
|
+
|
|
391
|
+--
|
|
392
|
+-- Indexes for table `transcripciones`
|
|
393
|
+--
|
|
394
|
+ALTER TABLE `transcripciones`
|
|
395
|
+ ADD PRIMARY KEY (`id`),
|
|
396
|
+ ADD KEY `estudiante_id` (`estudiante_id`),
|
|
397
|
+ ADD KEY `administracion_id` (`administracion_id`);
|
|
398
|
+
|
|
399
|
+--
|
|
400
|
+-- Indexes for table `usuarios`
|
|
401
|
+--
|
|
402
|
+ALTER TABLE `usuarios`
|
|
403
|
+ ADD PRIMARY KEY (`id`);
|
|
404
|
+
|
|
405
|
+--
|
|
406
|
+-- Indexes for table `visitas_enfermeria`
|
|
407
|
+--
|
|
408
|
+ALTER TABLE `visitas_enfermeria`
|
|
409
|
+ ADD PRIMARY KEY (`id`),
|
|
410
|
+ ADD KEY `estudiante_id` (`estudiante_id`),
|
|
411
|
+ ADD KEY `enfermera_id` (`enfermera_id`);
|
|
412
|
+
|
|
413
|
+--
|
|
414
|
+-- Indexes for table `visitas_oficina`
|
|
415
|
+--
|
|
416
|
+ALTER TABLE `visitas_oficina`
|
|
417
|
+ ADD PRIMARY KEY (`id`),
|
|
418
|
+ ADD KEY `estudiante_id` (`estudiante_id`),
|
|
419
|
+ ADD KEY `administradora_id` (`administradora_id`);
|
|
420
|
+
|
|
421
|
+--
|
|
422
|
+-- AUTO_INCREMENT for dumped tables
|
|
423
|
+--
|
|
424
|
+
|
|
425
|
+--
|
|
426
|
+-- AUTO_INCREMENT for table `asistencia`
|
|
427
|
+--
|
|
428
|
+ALTER TABLE `asistencia`
|
|
429
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
430
|
+
|
|
431
|
+--
|
|
432
|
+-- AUTO_INCREMENT for table `cursos`
|
|
433
|
+--
|
|
434
|
+ALTER TABLE `cursos`
|
|
435
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
436
|
+
|
|
437
|
+--
|
|
438
|
+-- AUTO_INCREMENT for table `estatus`
|
|
439
|
+--
|
|
440
|
+ALTER TABLE `estatus`
|
|
441
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
442
|
+
|
|
443
|
+--
|
|
444
|
+-- AUTO_INCREMENT for table `evaluaciones`
|
|
445
|
+--
|
|
446
|
+ALTER TABLE `evaluaciones`
|
|
447
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
448
|
+
|
|
449
|
+--
|
|
450
|
+-- AUTO_INCREMENT for table `facultad_ofrece`
|
|
451
|
+--
|
|
452
|
+ALTER TABLE `facultad_ofrece`
|
|
453
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
454
|
+
|
|
455
|
+--
|
|
456
|
+-- AUTO_INCREMENT for table `madres_estudiantes`
|
|
457
|
+--
|
|
458
|
+ALTER TABLE `madres_estudiantes`
|
|
459
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
460
|
+
|
|
461
|
+--
|
|
462
|
+-- AUTO_INCREMENT for table `matricula`
|
|
463
|
+--
|
|
464
|
+ALTER TABLE `matricula`
|
|
465
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
466
|
+
|
|
467
|
+--
|
|
468
|
+-- AUTO_INCREMENT for table `mensajes`
|
|
469
|
+--
|
|
470
|
+ALTER TABLE `mensajes`
|
|
471
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
472
|
+
|
|
473
|
+--
|
|
474
|
+-- AUTO_INCREMENT for table `notas`
|
|
475
|
+--
|
|
476
|
+ALTER TABLE `notas`
|
|
477
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
478
|
+
|
|
479
|
+--
|
|
480
|
+-- AUTO_INCREMENT for table `oferta`
|
|
481
|
+--
|
|
482
|
+ALTER TABLE `oferta`
|
|
483
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
484
|
+
|
|
485
|
+--
|
|
486
|
+-- AUTO_INCREMENT for table `transcripciones`
|
|
487
|
+--
|
|
488
|
+ALTER TABLE `transcripciones`
|
|
489
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
490
|
+
|
|
491
|
+--
|
|
492
|
+-- AUTO_INCREMENT for table `usuarios`
|
|
493
|
+--
|
|
494
|
+ALTER TABLE `usuarios`
|
|
495
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
496
|
+
|
|
497
|
+--
|
|
498
|
+-- AUTO_INCREMENT for table `visitas_enfermeria`
|
|
499
|
+--
|
|
500
|
+ALTER TABLE `visitas_enfermeria`
|
|
501
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
502
|
+
|
|
503
|
+--
|
|
504
|
+-- AUTO_INCREMENT for table `visitas_oficina`
|
|
505
|
+--
|
|
506
|
+ALTER TABLE `visitas_oficina`
|
|
507
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
508
|
+
|
|
509
|
+--
|
|
510
|
+-- Constraints for dumped tables
|
|
511
|
+--
|
|
512
|
+
|
|
513
|
+--
|
|
514
|
+-- Constraints for table `administracion`
|
|
515
|
+--
|
|
516
|
+ALTER TABLE `administracion`
|
|
517
|
+ ADD CONSTRAINT `administracion_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`id`);
|
|
518
|
+
|
|
519
|
+--
|
|
520
|
+-- Constraints for table `asistencia`
|
|
521
|
+--
|
|
522
|
+ALTER TABLE `asistencia`
|
|
523
|
+ ADD CONSTRAINT `asistencia_ibfk_1` FOREIGN KEY (`matricula_id`) REFERENCES `matricula` (`id`);
|
|
524
|
+
|
|
525
|
+--
|
|
526
|
+-- Constraints for table `enfermeras`
|
|
527
|
+--
|
|
528
|
+ALTER TABLE `enfermeras`
|
|
529
|
+ ADD CONSTRAINT `enfermeras_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`id`);
|
|
530
|
+
|
|
531
|
+--
|
|
532
|
+-- Constraints for table `estatus`
|
|
533
|
+--
|
|
534
|
+ALTER TABLE `estatus`
|
|
535
|
+ ADD CONSTRAINT `estatus_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`id`);
|
|
536
|
+
|
|
537
|
+--
|
|
538
|
+-- Constraints for table `estudiantes`
|
|
539
|
+--
|
|
540
|
+ALTER TABLE `estudiantes`
|
|
541
|
+ ADD CONSTRAINT `estudiantes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`id`);
|
|
542
|
+
|
|
543
|
+--
|
|
544
|
+-- Constraints for table `evaluaciones`
|
|
545
|
+--
|
|
546
|
+ALTER TABLE `evaluaciones`
|
|
547
|
+ ADD CONSTRAINT `evaluaciones_ibfk_1` FOREIGN KEY (`oferta_id`) REFERENCES `oferta` (`id`);
|
|
548
|
+
|
|
549
|
+--
|
|
550
|
+-- Constraints for table `facultad`
|
|
551
|
+--
|
|
552
|
+ALTER TABLE `facultad`
|
|
553
|
+ ADD CONSTRAINT `facultad_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`id`);
|
|
554
|
+
|
|
555
|
+--
|
|
556
|
+-- Constraints for table `facultad_ofrece`
|
|
557
|
+--
|
|
558
|
+ALTER TABLE `facultad_ofrece`
|
|
559
|
+ ADD CONSTRAINT `facultad_ofrece_ibfk_1` FOREIGN KEY (`oferta_id`) REFERENCES `oferta` (`id`),
|
|
560
|
+ ADD CONSTRAINT `facultad_ofrece_ibfk_2` FOREIGN KEY (`facultad_id`) REFERENCES `facultad` (`user_id`);
|
|
561
|
+
|
|
562
|
+--
|
|
563
|
+-- Constraints for table `madres`
|
|
564
|
+--
|
|
565
|
+ALTER TABLE `madres`
|
|
566
|
+ ADD CONSTRAINT `madres_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`id`);
|
|
567
|
+
|
|
568
|
+--
|
|
569
|
+-- Constraints for table `madres_estudiantes`
|
|
570
|
+--
|
|
571
|
+ALTER TABLE `madres_estudiantes`
|
|
572
|
+ ADD CONSTRAINT `madres_estudiantes_ibfk_1` FOREIGN KEY (`estudiante_id`) REFERENCES `estudiantes` (`user_id`),
|
|
573
|
+ ADD CONSTRAINT `madres_estudiantes_ibfk_2` FOREIGN KEY (`madre_id`) REFERENCES `madres` (`user_id`);
|
|
574
|
+
|
|
575
|
+--
|
|
576
|
+-- Constraints for table `matricula`
|
|
577
|
+--
|
|
578
|
+ALTER TABLE `matricula`
|
|
579
|
+ ADD CONSTRAINT `matricula_ibfk_1` FOREIGN KEY (`estudiante_id`) REFERENCES `estudiantes` (`user_id`),
|
|
580
|
+ ADD CONSTRAINT `matricula_ibfk_2` FOREIGN KEY (`oferta_id`) REFERENCES `oferta` (`id`);
|
|
581
|
+
|
|
582
|
+--
|
|
583
|
+-- Constraints for table `mensajes`
|
|
584
|
+--
|
|
585
|
+ALTER TABLE `mensajes`
|
|
586
|
+ ADD CONSTRAINT `mensajes_ibfk_1` FOREIGN KEY (`remitente`) REFERENCES `usuarios` (`id`);
|
|
587
|
+
|
|
588
|
+--
|
|
589
|
+-- Constraints for table `notas`
|
|
590
|
+--
|
|
591
|
+ALTER TABLE `notas`
|
|
592
|
+ ADD CONSTRAINT `notas_ibfk_1` FOREIGN KEY (`evaluacion_id`) REFERENCES `evaluaciones` (`id`),
|
|
593
|
+ ADD CONSTRAINT `notas_ibfk_2` FOREIGN KEY (`estudiante_id`) REFERENCES `estudiantes` (`user_id`);
|
|
594
|
+
|
|
595
|
+--
|
|
596
|
+-- Constraints for table `oferta`
|
|
597
|
+--
|
|
598
|
+ALTER TABLE `oferta`
|
|
599
|
+ ADD CONSTRAINT `oferta_ibfk_1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`);
|
|
600
|
+
|
|
601
|
+--
|
|
602
|
+-- Constraints for table `transcripciones`
|
|
603
|
+--
|
|
604
|
+ALTER TABLE `transcripciones`
|
|
605
|
+ ADD CONSTRAINT `transcripciones_ibfk_1` FOREIGN KEY (`estudiante_id`) REFERENCES `estudiantes` (`user_id`),
|
|
606
|
+ ADD CONSTRAINT `transcripciones_ibfk_2` FOREIGN KEY (`administracion_id`) REFERENCES `administracion` (`user_id`);
|
|
607
|
+
|
|
608
|
+--
|
|
609
|
+-- Constraints for table `visitas_enfermeria`
|
|
610
|
+--
|
|
611
|
+ALTER TABLE `visitas_enfermeria`
|
|
612
|
+ ADD CONSTRAINT `visitas_enfermeria_ibfk_1` FOREIGN KEY (`enfermera_id`) REFERENCES `enfermeras` (`user_id`),
|
|
613
|
+ ADD CONSTRAINT `visitas_enfermeria_ibfk_2` FOREIGN KEY (`estudiante_id`) REFERENCES `estudiantes` (`user_id`);
|
|
614
|
+
|
|
615
|
+--
|
|
616
|
+-- Constraints for table `visitas_oficina`
|
|
617
|
+--
|
|
618
|
+ALTER TABLE `visitas_oficina`
|
|
619
|
+ ADD CONSTRAINT `visitas_oficina_ibfk_1` FOREIGN KEY (`administradora_id`) REFERENCES `administracion` (`user_id`),
|
|
620
|
+ ADD CONSTRAINT `visitas_oficina_ibfk_2` FOREIGN KEY (`estudiante_id`) REFERENCES `estudiantes` (`user_id`);
|
|
621
|
+COMMIT;
|
|
622
|
+
|
|
623
|
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
624
|
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
625
|
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|