· 6 years ago · Nov 25, 2019, 06:47 PM
1-- phpMyAdmin SQL Dump
2-- version 4.9.1
3-- https://www.phpmyadmin.net/
4--
5-- Host: localhost
6-- Generation Time: Nov 25, 2019 at 06:18 PM
7-- Server version: 10.4.10-MariaDB
8-- PHP Version: 7.3.11
9
10SET FOREIGN_KEY_CHECKS=0;
11SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
12SET AUTOCOMMIT = 0;
13START TRANSACTION;
14SET time_zone = "+00:00";
15
16
17/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
18/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
19/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
20/*!40101 SET NAMES utf8mb4 */;
21
22--
23-- Database: `karma`
24--
25
26-- --------------------------------------------------------
27
28--
29-- Table structure for table `authentication_information_local`
30--
31
32CREATE TABLE IF NOT EXISTS `authentication_information_local` (
33 `id` int(11) NOT NULL AUTO_INCREMENT,
34 `people_id` int(11) NOT NULL,
35 `password_hash` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
36 `created_at` datetime NOT NULL,
37 `updated_at` datetime NOT NULL,
38 PRIMARY KEY (`id`),
39 UNIQUE KEY `people_id` (`people_id`)
40) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
41
42--
43-- Dumping data for table `authentication_information_local`
44--
45
46INSERT INTO `authentication_information_local` (`id`, `people_id`, `password_hash`, `created_at`, `updated_at`) VALUES
47(3, 5, '$2b$10$pxD60W8RoVyHJXMGi3P5b.meZfOtYirs6dd2sKIL9vDQvjQGxcNrC', '2019-11-23 16:25:01', '2019-11-23 16:25:01');
48
49-- --------------------------------------------------------
50
51--
52-- Table structure for table `blogs`
53--
54
55CREATE TABLE IF NOT EXISTS `blogs` (
56 `id` int(11) NOT NULL AUTO_INCREMENT,
57 `blog_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
58 `blog_alias_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
59 `created_at` datetime NOT NULL,
60 `updated_at` datetime NOT NULL,
61 PRIMARY KEY (`id`)
62) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
63
64-- --------------------------------------------------------
65
66--
67-- Table structure for table `blog_enrollment`
68--
69
70CREATE TABLE IF NOT EXISTS `blog_enrollment` (
71 `id` int(11) NOT NULL AUTO_INCREMENT,
72 `blog_id` int(11) NOT NULL,
73 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
74 `created_at` datetime NOT NULL,
75 `updated_at` datetime NOT NULL,
76 PRIMARY KEY (`id`),
77 KEY `blog_id` (`blog_id`)
78) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
79
80-- --------------------------------------------------------
81
82--
83-- Table structure for table `blog_entities_association`
84--
85
86CREATE TABLE IF NOT EXISTS `blog_entities_association` (
87 `id` int(11) NOT NULL AUTO_INCREMENT,
88 `blog_id` int(11) NOT NULL,
89 `entity_id` int(11) NOT NULL,
90 `status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
91 `created_at` datetime NOT NULL,
92 `updated_at` datetime NOT NULL,
93 PRIMARY KEY (`id`),
94 KEY `blog_id` (`blog_id`),
95 KEY `entity_id` (`entity_id`)
96) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
97
98-- --------------------------------------------------------
99
100--
101-- Table structure for table `blog_people_association`
102--
103
104CREATE TABLE IF NOT EXISTS `blog_people_association` (
105 `id` int(11) NOT NULL AUTO_INCREMENT,
106 `blog_id` int(11) NOT NULL,
107 `people_id` int(11) NOT NULL,
108 `status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
109 `created_at` datetime NOT NULL,
110 `updated_at` datetime NOT NULL,
111 PRIMARY KEY (`id`),
112 KEY `blog_id` (`blog_id`),
113 KEY `people_id` (`people_id`)
114) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
115
116-- --------------------------------------------------------
117
118--
119-- Table structure for table `blog_roles`
120--
121
122CREATE TABLE IF NOT EXISTS `blog_roles` (
123 `id` int(11) NOT NULL AUTO_INCREMENT,
124 `role_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
125 `role_slug` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
126 `role_description` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
127 `created_at` datetime NOT NULL,
128 `updated_at` datetime NOT NULL,
129 PRIMARY KEY (`id`)
130) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
131
132-- --------------------------------------------------------
133
134--
135-- Table structure for table `blog_role_people_association`
136--
137
138CREATE TABLE IF NOT EXISTS `blog_role_people_association` (
139 `id` int(11) NOT NULL AUTO_INCREMENT,
140 `blog_id` int(11) NOT NULL,
141 `role_id` int(11) NOT NULL,
142 `people_id` int(11) NOT NULL,
143 `created_at` datetime NOT NULL,
144 `updated_at` datetime NOT NULL,
145 PRIMARY KEY (`id`),
146 KEY `blog_id` (`blog_id`),
147 KEY `role_id` (`role_id`),
148 KEY `people_id` (`people_id`)
149) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
150
151-- --------------------------------------------------------
152
153--
154-- Table structure for table `classes`
155--
156
157CREATE TABLE IF NOT EXISTS `classes` (
158 `id` int(11) NOT NULL AUTO_INCREMENT,
159 `stream_id` int(11) DEFAULT NULL,
160 `division` int(11) DEFAULT NULL,
161 `current_class_slug` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
162 `start_date` datetime NOT NULL,
163 `end_date` datetime NOT NULL,
164 `created_at` datetime NOT NULL,
165 `updated_at` datetime NOT NULL,
166 PRIMARY KEY (`id`),
167 UNIQUE KEY `compositeIndex` (`stream_id`,`division`,`current_class_slug`)
168) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
169
170--
171-- Dumping data for table `classes`
172--
173
174INSERT INTO `classes` (`id`, `stream_id`, `division`, `current_class_slug`, `start_date`, `end_date`, `created_at`, `updated_at`) VALUES
175(1, 1, NULL, 'cse2017', '2019-11-17 10:44:55', '2019-11-17 10:44:55', '2019-11-17 10:44:55', '2019-11-17 10:44:55');
176
177-- --------------------------------------------------------
178
179--
180-- Table structure for table `classes_time_tables`
181--
182
183CREATE TABLE IF NOT EXISTS `classes_time_tables` (
184 `id` int(11) NOT NULL AUTO_INCREMENT,
185 `class_id` int(11) NOT NULL,
186 `day` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
187 `time_slot_id` int(11) NOT NULL,
188 `faculty_id` int(11) NOT NULL,
189 `created_at` datetime NOT NULL,
190 `updated_at` datetime NOT NULL,
191 PRIMARY KEY (`id`),
192 KEY `class_id` (`class_id`),
193 KEY `time_slot_id` (`time_slot_id`),
194 KEY `faculty_id` (`faculty_id`)
195) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
196
197--
198-- Dumping data for table `classes_time_tables`
199--
200
201INSERT INTO `classes_time_tables` (`id`, `class_id`, `day`, `time_slot_id`, `faculty_id`, `created_at`, `updated_at`) VALUES
202(2, 1, 'Monday', 1, 1, '2019-11-17 10:59:52', '2019-11-17 10:59:52'),
203(4, 1, 'Monday', 2, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
204(5, 1, 'Monday', 3, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
205(6, 1, 'Monday', 4, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
206(7, 1, 'Monday', 5, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
207(8, 1, 'Monday', 6, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
208(9, 1, 'Monday', 1, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
209(10, 1, 'Tuesday', 1, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
210(11, 1, 'Tuesday', 2, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
211(12, 1, 'Tuesday', 3, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
212(13, 1, 'Tuesday', 4, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
213(14, 1, 'Tuesday', 5, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
214(15, 1, 'Tuesday', 6, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
215(16, 1, 'Tuesday', 7, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
216(17, 1, 'Wednesday', 1, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
217(18, 1, 'Wednesday', 2, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
218(19, 1, 'Wednesday', 3, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
219(20, 1, 'Wednesday', 4, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
220(21, 1, 'Wednesday', 5, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
221(22, 1, 'Wednesday', 6, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
222(23, 1, 'Wednesday', 7, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
223(24, 1, 'Thursday', 1, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
224(25, 1, 'Thursday', 2, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
225(26, 1, 'Thursday', 3, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
226(27, 1, 'Thursday', 4, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
227(28, 1, 'Thursday', 5, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
228(29, 1, 'Thursday', 6, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
229(30, 1, 'Thursday', 7, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
230(31, 1, 'Friday', 1, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
231(32, 1, 'Friday', 2, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
232(33, 1, 'Friday', 3, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
233(34, 1, 'Friday', 4, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
234(35, 1, 'Friday', 5, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
235(36, 1, 'Friday', 6, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10'),
236(37, 1, 'Friday', 7, 1, '2019-11-17 11:02:10', '2019-11-17 11:02:10');
237
238-- --------------------------------------------------------
239
240--
241-- Table structure for table `courses_offered`
242--
243
244CREATE TABLE IF NOT EXISTS `courses_offered` (
245 `id` int(11) NOT NULL AUTO_INCREMENT,
246 `official_course_id` varchar(31) COLLATE utf8mb4_unicode_ci NOT NULL,
247 `name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
248 `department_id` int(11) NOT NULL,
249 `credits` int(11) NOT NULL,
250 `valid_start_date` datetime NOT NULL,
251 `valid_end_date` datetime NOT NULL,
252 `duration_in_days` int(11) NOT NULL,
253 `created_at` datetime NOT NULL,
254 `updated_at` datetime NOT NULL,
255 PRIMARY KEY (`id`),
256 KEY `department_id` (`department_id`)
257) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
258
259--
260-- Dumping data for table `courses_offered`
261--
262
263INSERT INTO `courses_offered` (`id`, `official_course_id`, `name`, `department_id`, `credits`, `valid_start_date`, `valid_end_date`, `duration_in_days`, `created_at`, `updated_at`) VALUES
264(1, 'TEST123', '\'Test Course\'', 2, 4, '2019-11-17 10:45:35', '2019-11-17 10:45:35', 100, '2019-11-17 10:45:35', '2019-11-17 10:45:35');
265
266-- --------------------------------------------------------
267
268--
269-- Table structure for table `entities`
270--
271
272CREATE TABLE IF NOT EXISTS `entities` (
273 `id` int(11) NOT NULL AUTO_INCREMENT,
274 `entity_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
275 `entity_slug` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
276 `entity_type_id` int(11) NOT NULL,
277 `created_at` datetime NOT NULL,
278 `updated_at` datetime NOT NULL,
279 PRIMARY KEY (`id`),
280 UNIQUE KEY `entity_name` (`entity_name`),
281 UNIQUE KEY `entity_slug` (`entity_slug`),
282 KEY `entity_type_id` (`entity_type_id`)
283) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
284
285--
286-- Dumping data for table `entities`
287--
288
289INSERT INTO `entities` (`id`, `entity_name`, `entity_slug`, `entity_type_id`, `created_at`, `updated_at`) VALUES
290(1, 'College of Engineering, Trivandrum', 'cet', 1, '2019-11-17 10:41:07', '2019-11-17 10:41:07'),
291(2, 'Department of Computer Science and Engineering', 'cse', 2, '2019-11-17 10:41:07', '2019-11-17 10:41:07');
292
293-- --------------------------------------------------------
294
295--
296-- Table structure for table `entity_information`
297--
298
299CREATE TABLE IF NOT EXISTS `entity_information` (
300 `id` int(11) NOT NULL AUTO_INCREMENT,
301 `entity_id` int(11) NOT NULL,
302 `slug_id` int(11) NOT NULL,
303 `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
304) ;
305
306-- --------------------------------------------------------
307
308--
309-- Table structure for table `entity_information_slugs`
310--
311
312CREATE TABLE IF NOT EXISTS `entity_information_slugs` (
313 `id` int(11) NOT NULL AUTO_INCREMENT,
314 `slug_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
315 `created_at` datetime NOT NULL,
316 `updated_at` datetime NOT NULL,
317 PRIMARY KEY (`id`),
318 UNIQUE KEY `slug_name` (`slug_name`)
319) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
320
321-- --------------------------------------------------------
322
323--
324-- Table structure for table `entity_parent_child_association`
325--
326
327CREATE TABLE IF NOT EXISTS `entity_parent_child_association` (
328 `id` int(11) NOT NULL AUTO_INCREMENT,
329 `parent_id` int(11) NOT NULL,
330 `child_id` int(11) NOT NULL,
331 `created_at` datetime NOT NULL,
332 `updated_at` datetime NOT NULL,
333 PRIMARY KEY (`id`),
334 UNIQUE KEY `compositeIndex` (`parent_id`,`child_id`),
335 KEY `child_id` (`child_id`)
336) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
337
338-- --------------------------------------------------------
339
340--
341-- Table structure for table `entity_people_enrollment`
342--
343
344CREATE TABLE IF NOT EXISTS `entity_people_enrollment` (
345 `id` int(11) NOT NULL AUTO_INCREMENT,
346 `entity_id` int(11) NOT NULL,
347 `people_id` int(11) NOT NULL,
348 `date_time` datetime NOT NULL,
349 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
350 `created_at` datetime NOT NULL,
351 `updated_at` datetime NOT NULL,
352 PRIMARY KEY (`id`),
353 KEY `entity_id` (`entity_id`),
354 KEY `people_id` (`people_id`)
355) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
356
357-- --------------------------------------------------------
358
359--
360-- Table structure for table `entity_people_position_enrolment`
361--
362
363CREATE TABLE IF NOT EXISTS `entity_people_position_enrolment` (
364 `id` int(11) NOT NULL AUTO_INCREMENT,
365 `entity_position_association_id` int(11) NOT NULL,
366 `people_id` int(11) NOT NULL,
367 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
368 `created_at` datetime NOT NULL,
369 `updated_at` datetime NOT NULL,
370 PRIMARY KEY (`id`),
371 KEY `entity_position_association_id` (`entity_position_association_id`),
372 KEY `people_id` (`people_id`)
373) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
374
375-- --------------------------------------------------------
376
377--
378-- Table structure for table `entity_position_association`
379--
380
381CREATE TABLE IF NOT EXISTS `entity_position_association` (
382 `id` int(11) NOT NULL AUTO_INCREMENT,
383 `entity_id` int(11) NOT NULL,
384 `status` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
385 `position_name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
386 `position_slug` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
387 `position_description` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
388 `created_at` datetime NOT NULL,
389 `updated_at` datetime NOT NULL,
390 PRIMARY KEY (`id`),
391 KEY `entity_id` (`entity_id`)
392) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
393
394-- --------------------------------------------------------
395
396--
397-- Table structure for table `entity_types`
398--
399
400CREATE TABLE IF NOT EXISTS `entity_types` (
401 `id` int(11) NOT NULL AUTO_INCREMENT,
402 `entity_type` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
403 `entity_type_slug` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
404 `created_at` datetime NOT NULL,
405 `updated_at` datetime NOT NULL,
406 PRIMARY KEY (`id`),
407 UNIQUE KEY `entity_type` (`entity_type`),
408 UNIQUE KEY `entity_type_slug` (`entity_type_slug`)
409) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
410
411--
412-- Dumping data for table `entity_types`
413--
414
415INSERT INTO `entity_types` (`id`, `entity_type`, `entity_type_slug`, `created_at`, `updated_at`) VALUES
416(1, 'college', 'college', '2019-11-17 10:39:29', '2019-11-17 10:39:29'),
417(2, 'department', 'dept', '2019-11-17 10:39:29', '2019-11-17 10:39:29');
418
419-- --------------------------------------------------------
420
421--
422-- Table structure for table `events`
423--
424
425CREATE TABLE IF NOT EXISTS `events` (
426 `id` int(11) NOT NULL AUTO_INCREMENT,
427 `event_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
428 `created_at` datetime NOT NULL,
429 `updated_at` datetime NOT NULL,
430 PRIMARY KEY (`id`)
431) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
432
433-- --------------------------------------------------------
434
435--
436-- Table structure for table `event_information`
437--
438
439CREATE TABLE IF NOT EXISTS `event_information` (
440 `id` int(11) NOT NULL AUTO_INCREMENT,
441 `event_id` int(11) NOT NULL,
442 `slug_id` int(11) NOT NULL,
443 `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
444) ;
445
446-- --------------------------------------------------------
447
448--
449-- Table structure for table `event_information_slugs`
450--
451
452CREATE TABLE IF NOT EXISTS `event_information_slugs` (
453 `id` int(11) NOT NULL AUTO_INCREMENT,
454 `slug_name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
455 `created_at` datetime NOT NULL,
456 `updated_at` datetime NOT NULL,
457 PRIMARY KEY (`id`),
458 UNIQUE KEY `slug_name` (`slug_name`)
459) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
460
461-- --------------------------------------------------------
462
463--
464-- Table structure for table `event_parent_child_association`
465--
466
467CREATE TABLE IF NOT EXISTS `event_parent_child_association` (
468 `id` int(11) NOT NULL AUTO_INCREMENT,
469 `parent_id` int(11) NOT NULL,
470 `child_id` int(11) NOT NULL,
471 `created_at` datetime NOT NULL,
472 `updated_at` datetime NOT NULL,
473 PRIMARY KEY (`id`),
474 UNIQUE KEY `compositeIndex` (`parent_id`,`child_id`),
475 KEY `child_id` (`child_id`)
476) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
477
478-- --------------------------------------------------------
479
480--
481-- Table structure for table `faculty_academic_enrolment_activity`
482--
483
484CREATE TABLE IF NOT EXISTS `faculty_academic_enrolment_activity` (
485 `id` int(11) NOT NULL AUTO_INCREMENT,
486 `people_id` int(11) NOT NULL,
487 `course_id` int(11) NOT NULL,
488 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
489 `date_time` datetime NOT NULL,
490 `created_at` datetime NOT NULL,
491 `updated_at` datetime NOT NULL,
492 PRIMARY KEY (`id`)
493) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
494
495--
496-- Dumping data for table `faculty_academic_enrolment_activity`
497--
498
499INSERT INTO `faculty_academic_enrolment_activity` (`id`, `people_id`, `course_id`, `activity`, `date_time`, `created_at`, `updated_at`) VALUES
500(1, 3, 1, 'T', '2019-11-17 10:59:22', '2019-11-17 10:59:22', '2019-11-17 10:59:22');
501
502-- --------------------------------------------------------
503
504--
505-- Table structure for table `faculty_class_advisory_activity`
506--
507
508CREATE TABLE IF NOT EXISTS `faculty_class_advisory_activity` (
509 `id` int(11) NOT NULL AUTO_INCREMENT,
510 `people_id` int(11) NOT NULL,
511 `class_id` int(11) NOT NULL,
512 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
513 `date_time` datetime NOT NULL,
514 `course_id` int(11) NOT NULL,
515 `created_at` datetime NOT NULL,
516 `updated_at` datetime NOT NULL,
517 PRIMARY KEY (`id`),
518 KEY `people_id` (`people_id`),
519 KEY `class_id` (`class_id`),
520 KEY `course_id` (`course_id`)
521) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
522
523-- --------------------------------------------------------
524
525--
526-- Table structure for table `media`
527--
528
529CREATE TABLE IF NOT EXISTS `media` (
530 `id` int(11) NOT NULL AUTO_INCREMENT,
531 `media_title` varchar(63) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
532 `media_file_name` varchar(2047) COLLATE utf8mb4_unicode_ci NOT NULL,
533 `media_location` varchar(2047) COLLATE utf8mb4_unicode_ci NOT NULL,
534 `created_at` datetime NOT NULL,
535 `updated_at` datetime NOT NULL,
536 PRIMARY KEY (`id`)
537) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
538
539-- --------------------------------------------------------
540
541--
542-- Table structure for table `media_roles`
543--
544
545CREATE TABLE IF NOT EXISTS `media_roles` (
546 `id` int(11) NOT NULL AUTO_INCREMENT,
547 `role_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
548 `role_slug` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
549 `role_description` varchar(2047) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
550 `created_at` datetime NOT NULL,
551 `updated_at` datetime NOT NULL,
552 PRIMARY KEY (`id`),
553 UNIQUE KEY `role_name` (`role_name`),
554 UNIQUE KEY `role_slug` (`role_slug`)
555) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
556
557-- --------------------------------------------------------
558
559--
560-- Table structure for table `media_role_entity_association`
561--
562
563CREATE TABLE IF NOT EXISTS `media_role_entity_association` (
564 `id` int(11) NOT NULL AUTO_INCREMENT,
565 `media_id` int(11) NOT NULL,
566 `role_id` int(11) NOT NULL,
567 `entity_id` int(11) NOT NULL,
568 `created_at` datetime NOT NULL,
569 `updated_at` datetime NOT NULL,
570 PRIMARY KEY (`id`),
571 UNIQUE KEY `compositeIndex` (`media_id`,`role_id`,`entity_id`),
572 KEY `role_id` (`role_id`),
573 KEY `entity_id` (`entity_id`)
574) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
575
576-- --------------------------------------------------------
577
578--
579-- Table structure for table `media_role_people_association`
580--
581
582CREATE TABLE IF NOT EXISTS `media_role_people_association` (
583 `id` int(11) NOT NULL AUTO_INCREMENT,
584 `media_id` int(11) NOT NULL,
585 `role_id` int(11) NOT NULL,
586 `people_id` int(11) NOT NULL,
587 `created_at` datetime NOT NULL,
588 `updated_at` datetime NOT NULL,
589 PRIMARY KEY (`id`),
590 UNIQUE KEY `compositeIndex` (`media_id`,`role_id`,`people_id`),
591 KEY `role_id` (`role_id`),
592 KEY `people_id` (`people_id`)
593) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
594
595-- --------------------------------------------------------
596
597--
598-- Table structure for table `menu_data`
599--
600
601CREATE TABLE IF NOT EXISTS `menu_data` (
602 `id` int(11) NOT NULL AUTO_INCREMENT,
603 `entity_id` int(11) NOT NULL,
604 `menu_type` int(11) NOT NULL,
605 `menu_title` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
606 `created_at` datetime NOT NULL,
607 `updated_at` datetime NOT NULL,
608 PRIMARY KEY (`id`),
609 UNIQUE KEY `compositeIndex` (`entity_id`,`menu_type`)
610) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
611
612--
613-- Dumping data for table `menu_data`
614--
615
616INSERT INTO `menu_data` (`id`, `entity_id`, `menu_type`, `menu_title`, `created_at`, `updated_at`) VALUES
617(1, 1, 1, 'Data1', '2019-11-17 12:42:06', '2019-11-17 12:42:06');
618
619-- --------------------------------------------------------
620
621--
622-- Table structure for table `menu_elements`
623--
624
625CREATE TABLE IF NOT EXISTS `menu_elements` (
626 `id` int(11) NOT NULL AUTO_INCREMENT,
627 `menu_id` int(11) NOT NULL,
628 `position` int(11) NOT NULL,
629 `item_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
630 `item_url` varchar(1023) COLLATE utf8mb4_unicode_ci NOT NULL,
631 `created_at` datetime NOT NULL,
632 `updated_at` datetime NOT NULL,
633 PRIMARY KEY (`id`),
634 KEY `menu_id` (`menu_id`)
635) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
636
637--
638-- Dumping data for table `menu_elements`
639--
640
641INSERT INTO `menu_elements` (`id`, `menu_id`, `position`, `item_name`, `item_url`, `created_at`, `updated_at`) VALUES
642(1, 1, 1, 'Login', '/login', '2019-11-17 12:42:47', '2019-11-17 12:42:47');
643
644-- --------------------------------------------------------
645
646--
647-- Table structure for table `menu_parent_child_associations`
648--
649
650CREATE TABLE IF NOT EXISTS `menu_parent_child_associations` (
651 `id` int(11) NOT NULL AUTO_INCREMENT,
652 `parent_id` int(11) NOT NULL,
653 `child_id` int(11) NOT NULL,
654 `created_at` datetime NOT NULL,
655 `updated_at` datetime NOT NULL,
656 PRIMARY KEY (`id`),
657 KEY `parent_id` (`parent_id`),
658 KEY `child_id` (`child_id`)
659) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
660
661-- --------------------------------------------------------
662
663--
664-- Table structure for table `news`
665--
666
667CREATE TABLE IF NOT EXISTS `news` (
668 `id` int(11) NOT NULL AUTO_INCREMENT,
669 `news_id` int(11) NOT NULL,
670 `entity_id` int(11) NOT NULL,
671 `created_at` datetime NOT NULL,
672 `updated_at` datetime NOT NULL,
673 PRIMARY KEY (`id`),
674 UNIQUE KEY `compositeIndex` (`news_id`,`entity_id`),
675 KEY `entity_id` (`entity_id`)
676) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
677
678-- --------------------------------------------------------
679
680--
681-- Table structure for table `news_data`
682--
683
684CREATE TABLE IF NOT EXISTS `news_data` (
685 `id` int(11) NOT NULL AUTO_INCREMENT,
686 `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
687 `text` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
688 `created_at` datetime NOT NULL,
689 `updated_at` datetime NOT NULL,
690 PRIMARY KEY (`id`)
691) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
692
693-- --------------------------------------------------------
694
695--
696-- Table structure for table `people`
697--
698
699CREATE TABLE IF NOT EXISTS `people` (
700 `id` int(11) NOT NULL AUTO_INCREMENT,
701 `first_name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
702 `middle_name` varchar(63) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
703 `last_name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
704 `gender` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
705 `date_of_birth` date NOT NULL,
706 `nationality` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
707 `created_at` datetime NOT NULL,
708 `updated_at` datetime NOT NULL,
709 PRIMARY KEY (`id`)
710) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
711
712--
713-- Dumping data for table `people`
714--
715
716INSERT INTO `people` (`id`, `first_name`, `middle_name`, `last_name`, `gender`, `date_of_birth`, `nationality`, `created_at`, `updated_at`) VALUES
717(3, 'Faculty', '', '1', 'M', '1982-01-01', 'Indian', '2019-11-17 10:27:42', '2019-11-17 10:27:42'),
718(4, 'Student', '', '1', 'M', '1999-10-12', 'Indian', '2019-11-17 10:27:42', '2019-11-17 10:27:42'),
719(5, 'Test', '', 'Test', 'M', '1999-10-12', 'Indian', '2019-11-23 16:25:01', '2019-11-23 16:25:01');
720
721-- --------------------------------------------------------
722
723--
724-- Table structure for table `people_activities`
725--
726
727CREATE TABLE IF NOT EXISTS `people_activities` (
728 `id` int(11) NOT NULL AUTO_INCREMENT,
729 `activity_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
730 `activity_slug` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
731 `activity_description` varchar(2047) COLLATE utf8mb4_unicode_ci NOT NULL,
732 `created_at` datetime NOT NULL,
733 `updated_at` datetime NOT NULL,
734 PRIMARY KEY (`id`),
735 UNIQUE KEY `activity_name` (`activity_name`),
736 UNIQUE KEY `activity_slug` (`activity_slug`)
737) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
738
739-- --------------------------------------------------------
740
741--
742-- Table structure for table `people_activity_log`
743--
744
745CREATE TABLE IF NOT EXISTS `people_activity_log` (
746 `id` int(11) NOT NULL AUTO_INCREMENT,
747 `people_id` int(11) NOT NULL,
748 `people_activity_id` int(11) NOT NULL,
749 `created_at` datetime NOT NULL,
750 `updated_at` datetime NOT NULL,
751 PRIMARY KEY (`id`),
752 KEY `people_id` (`people_id`),
753 KEY `people_activity_id` (`people_activity_id`)
754) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
755
756-- --------------------------------------------------------
757
758--
759-- Table structure for table `people_information`
760--
761
762CREATE TABLE IF NOT EXISTS `people_information` (
763 `id` int(11) NOT NULL AUTO_INCREMENT,
764 `people_id` int(11) NOT NULL,
765 `slug_id` int(11) NOT NULL,
766 `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
767) ;
768
769--
770-- Dumping data for table `people_information`
771--
772
773INSERT INTO `people_information` (`id`, `people_id`, `slug_id`, `data`, `created_at`, `updated_at`) VALUES
774(3, 3, 1, '\"faculty1@cet.ac.in\"', '2019-11-17 10:27:42', '2019-11-17 10:27:42'),
775(4, 4, 1, '\"student@cet.ac.in\"', '2019-11-17 10:27:42', '2019-11-17 10:27:42'),
776(5, 5, 1, '\"test@test.com\"', '2019-11-23 16:25:01', '2019-11-23 16:25:01');
777
778-- --------------------------------------------------------
779
780--
781-- Table structure for table `people_information_slugs`
782--
783
784CREATE TABLE IF NOT EXISTS `people_information_slugs` (
785 `id` int(11) NOT NULL AUTO_INCREMENT,
786 `slug_name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
787 `created_at` datetime NOT NULL,
788 `updated_at` datetime NOT NULL,
789 PRIMARY KEY (`id`)
790) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
791
792--
793-- Dumping data for table `people_information_slugs`
794--
795
796INSERT INTO `people_information_slugs` (`id`, `slug_name`, `created_at`, `updated_at`) VALUES
797(1, 'email', '2019-11-17 10:52:49', '2019-11-17 10:52:49');
798
799-- --------------------------------------------------------
800
801--
802-- Table structure for table `posts`
803--
804
805CREATE TABLE IF NOT EXISTS `posts` (
806 `id` int(11) NOT NULL AUTO_INCREMENT,
807 `blog_id` int(11) NOT NULL,
808 `post_url` varchar(2047) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
809 `people_id` int(11) NOT NULL,
810 `created_at` datetime NOT NULL,
811 `updated_at` datetime NOT NULL,
812 PRIMARY KEY (`id`),
813 KEY `blog_id` (`blog_id`)
814) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
815
816-- --------------------------------------------------------
817
818--
819-- Table structure for table `post_data`
820--
821
822CREATE TABLE IF NOT EXISTS `post_data` (
823 `id` int(11) NOT NULL AUTO_INCREMENT,
824 `post_id` int(11) NOT NULL,
825 `author_id` int(11) NOT NULL,
826 `post_title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
827 `post_element_status` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
828 `post_content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
829 `created_at` datetime NOT NULL,
830 `updated_at` datetime NOT NULL,
831 PRIMARY KEY (`id`),
832 KEY `post_id` (`post_id`),
833 KEY `author_id` (`author_id`)
834) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
835
836-- --------------------------------------------------------
837
838--
839-- Table structure for table `streams_offered`
840--
841
842CREATE TABLE IF NOT EXISTS `streams_offered` (
843 `id` int(11) NOT NULL AUTO_INCREMENT,
844 `stream_type_id` int(11) NOT NULL,
845 `stream_name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
846 `department_id` int(11) NOT NULL,
847 `valid_start_date` datetime NOT NULL,
848 `valid_end_date` datetime NOT NULL,
849 `created_at` datetime NOT NULL,
850 `updated_at` datetime NOT NULL,
851 PRIMARY KEY (`id`),
852 KEY `stream_type_id` (`stream_type_id`),
853 KEY `department_id` (`department_id`)
854) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
855
856--
857-- Dumping data for table `streams_offered`
858--
859
860INSERT INTO `streams_offered` (`id`, `stream_type_id`, `stream_name`, `department_id`, `valid_start_date`, `valid_end_date`, `created_at`, `updated_at`) VALUES
861(1, 1, '\'Computer Science\'', 2, '2019-11-17 10:44:05', '2019-11-17 10:44:05', '2019-11-17 10:44:05', '2019-11-17 10:44:05');
862
863-- --------------------------------------------------------
864
865--
866-- Table structure for table `stream_types`
867--
868
869CREATE TABLE IF NOT EXISTS `stream_types` (
870 `id` int(11) NOT NULL AUTO_INCREMENT,
871 `stream_type_long` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
872 `stream_type_short` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
873 `start_date` datetime NOT NULL,
874 `end_date` datetime NOT NULL,
875 `created_at` datetime NOT NULL,
876 `updated_at` datetime NOT NULL,
877 PRIMARY KEY (`id`)
878) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
879
880--
881-- Dumping data for table `stream_types`
882--
883
884INSERT INTO `stream_types` (`id`, `stream_type_long`, `stream_type_short`, `start_date`, `end_date`, `created_at`, `updated_at`) VALUES
885(1, '\'Bachelor of Technology\'', '\'B.Tech\'', '2019-11-17 10:43:24', '2019-11-17 10:43:24', '2019-11-17 10:43:24', '2019-11-17 10:43:24');
886
887-- --------------------------------------------------------
888
889--
890-- Table structure for table `student_attendance_data`
891--
892
893CREATE TABLE IF NOT EXISTS `student_attendance_data` (
894 `id` int(11) NOT NULL AUTO_INCREMENT,
895 `student_id` int(11) NOT NULL,
896 `course_id` int(11) NOT NULL,
897 `faculty_id` int(11) NOT NULL,
898 `start_date_time` datetime NOT NULL,
899 `end_date_time` datetime NOT NULL,
900 `value` int(11) NOT NULL,
901 `max_value` int(11) NOT NULL,
902 `created_at` datetime NOT NULL,
903 `updated_at` datetime NOT NULL,
904 `people_id` int(11) DEFAULT NULL,
905 PRIMARY KEY (`id`),
906 UNIQUE KEY `compositeIndex` (`student_id`,`start_date_time`,`end_date_time`),
907 KEY `course_id` (`course_id`),
908 KEY `faculty_id` (`faculty_id`),
909 KEY `people_id` (`people_id`)
910) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
911
912--
913-- Dumping data for table `student_attendance_data`
914--
915
916INSERT INTO `student_attendance_data` (`id`, `student_id`, `course_id`, `faculty_id`, `start_date_time`, `end_date_time`, `value`, `max_value`, `created_at`, `updated_at`, `people_id`) VALUES
917(1, 38, 1, 3, '2019-11-24 11:52:05', '2019-11-24 11:52:05', 39, 46, '2019-11-24 11:52:05', '2019-11-24 11:52:05', 5);
918
919-- --------------------------------------------------------
920
921--
922-- Table structure for table `student_class_enrolment_activity`
923--
924
925CREATE TABLE IF NOT EXISTS `student_class_enrolment_activity` (
926 `id` int(11) NOT NULL AUTO_INCREMENT,
927 `people_id` int(11) NOT NULL,
928 `class_id` int(11) NOT NULL,
929 `date` datetime NOT NULL,
930 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
931 `created_at` datetime NOT NULL,
932 `updated_at` datetime NOT NULL,
933 PRIMARY KEY (`id`),
934 KEY `people_id` (`people_id`),
935 KEY `class_id` (`class_id`)
936) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
937
938-- --------------------------------------------------------
939
940--
941-- Table structure for table `student_course_enrolment_activity`
942--
943
944CREATE TABLE IF NOT EXISTS `student_course_enrolment_activity` (
945 `id` int(11) NOT NULL AUTO_INCREMENT,
946 `people_id` int(11) NOT NULL,
947 `course_id` int(11) NOT NULL,
948 `date_time` datetime NOT NULL,
949 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
950 `created_at` datetime NOT NULL,
951 `updated_at` datetime NOT NULL,
952 PRIMARY KEY (`id`),
953 KEY `people_id` (`people_id`),
954 KEY `course_id` (`course_id`)
955) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
956
957--
958-- Dumping data for table `student_course_enrolment_activity`
959--
960
961INSERT INTO `student_course_enrolment_activity` (`id`, `people_id`, `course_id`, `date_time`, `activity`, `created_at`, `updated_at`) VALUES
962(1, 5, 1, '2019-11-25 23:36:21', 'T', '2019-11-25 23:36:21', '2019-11-25 23:36:21');
963
964-- --------------------------------------------------------
965
966--
967-- Table structure for table `student_course_grades`
968--
969
970CREATE TABLE IF NOT EXISTS `student_course_grades` (
971 `id` int(11) NOT NULL AUTO_INCREMENT,
972 `people_id` int(11) NOT NULL,
973 `course_id` int(11) NOT NULL,
974 `status` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
975 `grade` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL,
976 `grading_standard_id` int(11) NOT NULL,
977 `created_at` datetime NOT NULL,
978 `updated_at` datetime NOT NULL,
979 PRIMARY KEY (`id`),
980 KEY `people_id` (`people_id`),
981 KEY `course_id` (`course_id`),
982 KEY `grading_standard_id` (`grading_standard_id`)
983) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
984
985-- --------------------------------------------------------
986
987--
988-- Table structure for table `student_course_grading_standards`
989--
990
991CREATE TABLE IF NOT EXISTS `student_course_grading_standards` (
992 `id` int(11) NOT NULL AUTO_INCREMENT,
993 `standard_name` varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
994 `standard_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
995 `created_at` datetime NOT NULL,
996 `updated_at` datetime NOT NULL,
997 PRIMARY KEY (`id`)
998) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
999
1000-- --------------------------------------------------------
1001
1002--
1003-- Table structure for table `student_course_grading_standards_grade_association`
1004--
1005
1006CREATE TABLE IF NOT EXISTS `student_course_grading_standards_grade_association` (
1007 `id` int(11) NOT NULL AUTO_INCREMENT,
1008 `grading_standard_id` int(11) NOT NULL,
1009 `grade` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL,
1010 `created_at` datetime NOT NULL,
1011 `updated_at` datetime NOT NULL,
1012 PRIMARY KEY (`id`),
1013 KEY `grading_standard_id` (`grading_standard_id`)
1014) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1015
1016-- --------------------------------------------------------
1017
1018--
1019-- Table structure for table `student_course_internal_assessment`
1020--
1021
1022CREATE TABLE IF NOT EXISTS `student_course_internal_assessment` (
1023 `id` int(11) NOT NULL AUTO_INCREMENT,
1024 `people_id` int(11) NOT NULL,
1025 `course_id` int(11) NOT NULL,
1026 `type` varchar(23) COLLATE utf8mb4_unicode_ci NOT NULL,
1027 `start_date_time` datetime NOT NULL,
1028 `end_date_time` datetime NOT NULL,
1029 `marks_obtained` int(11) NOT NULL,
1030 `maximum_marks` int(11) NOT NULL,
1031 `status` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
1032 `created_at` datetime NOT NULL,
1033 `updated_at` datetime NOT NULL,
1034 PRIMARY KEY (`id`),
1035 KEY `people_id` (`people_id`),
1036 KEY `course_id` (`course_id`)
1037) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1038
1039-- --------------------------------------------------------
1040
1041--
1042-- Table structure for table `student_stream_enrolment_activity`
1043--
1044
1045CREATE TABLE IF NOT EXISTS `student_stream_enrolment_activity` (
1046 `id` int(11) NOT NULL AUTO_INCREMENT,
1047 `people_id` int(11) NOT NULL,
1048 `stream_id` int(11) NOT NULL,
1049 `date` datetime NOT NULL,
1050 `activity` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
1051 `created_at` datetime NOT NULL,
1052 `updated_at` datetime NOT NULL,
1053 PRIMARY KEY (`id`),
1054 KEY `people_id` (`people_id`),
1055 KEY `stream_id` (`stream_id`)
1056) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1057
1058-- --------------------------------------------------------
1059
1060--
1061-- Table structure for table `time_slots`
1062--
1063
1064CREATE TABLE IF NOT EXISTS `time_slots` (
1065 `id` int(11) NOT NULL AUTO_INCREMENT,
1066 `start_timestamp` time NOT NULL,
1067 `end_timestamp` time NOT NULL,
1068 `created_at` datetime NOT NULL,
1069 `updated_at` datetime NOT NULL,
1070 PRIMARY KEY (`id`)
1071) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1072
1073--
1074-- Dumping data for table `time_slots`
1075--
1076
1077INSERT INTO `time_slots` (`id`, `start_timestamp`, `end_timestamp`, `created_at`, `updated_at`) VALUES
1078(1, '09:00:00', '10:00:00', '2019-11-17 10:37:57', '2019-11-17 10:37:57'),
1079(2, '10:00:00', '11:00:00', '2019-11-17 10:37:57', '2019-11-17 10:37:57'),
1080(3, '11:00:00', '12:00:00', '2019-11-17 10:37:57', '2019-11-17 10:37:57'),
1081(4, '12:00:00', '01:00:00', '2019-11-17 10:37:57', '2019-11-17 10:37:57'),
1082(5, '01:00:00', '02:00:00', '2019-11-17 10:37:57', '2019-11-17 10:37:57'),
1083(6, '02:00:00', '03:00:00', '2019-11-17 10:37:57', '2019-11-17 10:37:57'),
1084(7, '03:00:00', '04:00:00', '2019-11-17 10:37:57', '2019-11-17 10:37:57');
1085
1086--
1087-- Constraints for dumped tables
1088--
1089
1090--
1091-- Constraints for table `authentication_information_local`
1092--
1093ALTER TABLE `authentication_information_local`
1094 ADD CONSTRAINT `authentication_information_local_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1095
1096--
1097-- Constraints for table `blog_enrollment`
1098--
1099ALTER TABLE `blog_enrollment`
1100 ADD CONSTRAINT `blog_enrollment_ibfk_1` FOREIGN KEY (`blog_id`) REFERENCES `blogs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1101
1102--
1103-- Constraints for table `blog_entities_association`
1104--
1105ALTER TABLE `blog_entities_association`
1106 ADD CONSTRAINT `blog_entities_association_ibfk_1` FOREIGN KEY (`blog_id`) REFERENCES `blogs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1107 ADD CONSTRAINT `blog_entities_association_ibfk_2` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1108
1109--
1110-- Constraints for table `blog_people_association`
1111--
1112ALTER TABLE `blog_people_association`
1113 ADD CONSTRAINT `blog_people_association_ibfk_1` FOREIGN KEY (`blog_id`) REFERENCES `blogs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1114 ADD CONSTRAINT `blog_people_association_ibfk_2` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1115
1116--
1117-- Constraints for table `blog_role_people_association`
1118--
1119ALTER TABLE `blog_role_people_association`
1120 ADD CONSTRAINT `blog_role_people_association_ibfk_1` FOREIGN KEY (`blog_id`) REFERENCES `blogs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1121 ADD CONSTRAINT `blog_role_people_association_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `blog_roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1122 ADD CONSTRAINT `blog_role_people_association_ibfk_3` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1123
1124--
1125-- Constraints for table `classes`
1126--
1127ALTER TABLE `classes`
1128 ADD CONSTRAINT `classes_ibfk_1` FOREIGN KEY (`stream_id`) REFERENCES `streams_offered` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1129
1130--
1131-- Constraints for table `classes_time_tables`
1132--
1133ALTER TABLE `classes_time_tables`
1134 ADD CONSTRAINT `classes_time_tables_ibfk_1` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1135 ADD CONSTRAINT `classes_time_tables_ibfk_2` FOREIGN KEY (`time_slot_id`) REFERENCES `time_slots` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1136 ADD CONSTRAINT `classes_time_tables_ibfk_3` FOREIGN KEY (`faculty_id`) REFERENCES `faculty_academic_enrolment_activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1137
1138--
1139-- Constraints for table `courses_offered`
1140--
1141ALTER TABLE `courses_offered`
1142 ADD CONSTRAINT `courses_offered_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1143
1144--
1145-- Constraints for table `entities`
1146--
1147ALTER TABLE `entities`
1148 ADD CONSTRAINT `entities_ibfk_1` FOREIGN KEY (`entity_type_id`) REFERENCES `entity_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1149
1150--
1151-- Constraints for table `entity_parent_child_association`
1152--
1153ALTER TABLE `entity_parent_child_association`
1154 ADD CONSTRAINT `entity_parent_child_association_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1155 ADD CONSTRAINT `entity_parent_child_association_ibfk_2` FOREIGN KEY (`child_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1156
1157--
1158-- Constraints for table `entity_people_enrollment`
1159--
1160ALTER TABLE `entity_people_enrollment`
1161 ADD CONSTRAINT `entity_people_enrollment_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1162 ADD CONSTRAINT `entity_people_enrollment_ibfk_2` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1163
1164--
1165-- Constraints for table `entity_people_position_enrolment`
1166--
1167ALTER TABLE `entity_people_position_enrolment`
1168 ADD CONSTRAINT `entity_people_position_enrolment_ibfk_1` FOREIGN KEY (`entity_position_association_id`) REFERENCES `entity_position_association` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1169 ADD CONSTRAINT `entity_people_position_enrolment_ibfk_2` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1170
1171--
1172-- Constraints for table `entity_position_association`
1173--
1174ALTER TABLE `entity_position_association`
1175 ADD CONSTRAINT `entity_position_association_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1176
1177--
1178-- Constraints for table `event_parent_child_association`
1179--
1180ALTER TABLE `event_parent_child_association`
1181 ADD CONSTRAINT `event_parent_child_association_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `events` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1182 ADD CONSTRAINT `event_parent_child_association_ibfk_2` FOREIGN KEY (`child_id`) REFERENCES `events` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1183
1184--
1185-- Constraints for table `faculty_class_advisory_activity`
1186--
1187ALTER TABLE `faculty_class_advisory_activity`
1188 ADD CONSTRAINT `faculty_class_advisory_activity_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1189 ADD CONSTRAINT `faculty_class_advisory_activity_ibfk_2` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1190 ADD CONSTRAINT `faculty_class_advisory_activity_ibfk_3` FOREIGN KEY (`course_id`) REFERENCES `courses_offered` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1191
1192--
1193-- Constraints for table `media_role_entity_association`
1194--
1195ALTER TABLE `media_role_entity_association`
1196 ADD CONSTRAINT `media_role_entity_association_ibfk_1` FOREIGN KEY (`media_id`) REFERENCES `media` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1197 ADD CONSTRAINT `media_role_entity_association_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `media_roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1198 ADD CONSTRAINT `media_role_entity_association_ibfk_3` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1199
1200--
1201-- Constraints for table `media_role_people_association`
1202--
1203ALTER TABLE `media_role_people_association`
1204 ADD CONSTRAINT `media_role_people_association_ibfk_1` FOREIGN KEY (`media_id`) REFERENCES `media` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1205 ADD CONSTRAINT `media_role_people_association_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `media_roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1206 ADD CONSTRAINT `media_role_people_association_ibfk_3` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1207
1208--
1209-- Constraints for table `menu_data`
1210--
1211ALTER TABLE `menu_data`
1212 ADD CONSTRAINT `menu_data_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1213
1214--
1215-- Constraints for table `menu_elements`
1216--
1217ALTER TABLE `menu_elements`
1218 ADD CONSTRAINT `menu_elements_ibfk_1` FOREIGN KEY (`menu_id`) REFERENCES `menu_data` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1219
1220--
1221-- Constraints for table `menu_parent_child_associations`
1222--
1223ALTER TABLE `menu_parent_child_associations`
1224 ADD CONSTRAINT `menu_parent_child_associations_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `menu_elements` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1225 ADD CONSTRAINT `menu_parent_child_associations_ibfk_2` FOREIGN KEY (`child_id`) REFERENCES `menu_elements` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1226
1227--
1228-- Constraints for table `news`
1229--
1230ALTER TABLE `news`
1231 ADD CONSTRAINT `news_ibfk_1` FOREIGN KEY (`news_id`) REFERENCES `news_data` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1232 ADD CONSTRAINT `news_ibfk_2` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1233
1234--
1235-- Constraints for table `people_activity_log`
1236--
1237ALTER TABLE `people_activity_log`
1238 ADD CONSTRAINT `people_activity_log_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1239 ADD CONSTRAINT `people_activity_log_ibfk_2` FOREIGN KEY (`people_activity_id`) REFERENCES `people_activities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1240
1241--
1242-- Constraints for table `posts`
1243--
1244ALTER TABLE `posts`
1245 ADD CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`blog_id`) REFERENCES `blogs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1246
1247--
1248-- Constraints for table `post_data`
1249--
1250ALTER TABLE `post_data`
1251 ADD CONSTRAINT `post_data_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1252 ADD CONSTRAINT `post_data_ibfk_2` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1253
1254--
1255-- Constraints for table `streams_offered`
1256--
1257ALTER TABLE `streams_offered`
1258 ADD CONSTRAINT `streams_offered_ibfk_1` FOREIGN KEY (`stream_type_id`) REFERENCES `stream_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1259 ADD CONSTRAINT `streams_offered_ibfk_2` FOREIGN KEY (`department_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1260
1261--
1262-- Constraints for table `student_attendance_data`
1263--
1264ALTER TABLE `student_attendance_data`
1265 ADD CONSTRAINT `student_attendance_data_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses_offered` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1266 ADD CONSTRAINT `student_attendance_data_ibfk_2` FOREIGN KEY (`faculty_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1267 ADD CONSTRAINT `student_attendance_data_ibfk_3` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1268
1269--
1270-- Constraints for table `student_class_enrolment_activity`
1271--
1272ALTER TABLE `student_class_enrolment_activity`
1273 ADD CONSTRAINT `student_class_enrolment_activity_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1274 ADD CONSTRAINT `student_class_enrolment_activity_ibfk_2` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1275
1276--
1277-- Constraints for table `student_course_enrolment_activity`
1278--
1279ALTER TABLE `student_course_enrolment_activity`
1280 ADD CONSTRAINT `student_course_enrolment_activity_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1281 ADD CONSTRAINT `student_course_enrolment_activity_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses_offered` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1282
1283--
1284-- Constraints for table `student_course_grades`
1285--
1286ALTER TABLE `student_course_grades`
1287 ADD CONSTRAINT `student_course_grades_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1288 ADD CONSTRAINT `student_course_grades_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses_offered` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1289 ADD CONSTRAINT `student_course_grades_ibfk_3` FOREIGN KEY (`grading_standard_id`) REFERENCES `student_course_grading_standards` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1290
1291--
1292-- Constraints for table `student_course_grading_standards_grade_association`
1293--
1294ALTER TABLE `student_course_grading_standards_grade_association`
1295 ADD CONSTRAINT `student_course_grading_standards_grade_association_ibfk_1` FOREIGN KEY (`grading_standard_id`) REFERENCES `student_course_grading_standards` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1296
1297--
1298-- Constraints for table `student_course_internal_assessment`
1299--
1300ALTER TABLE `student_course_internal_assessment`
1301 ADD CONSTRAINT `student_course_internal_assessment_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1302 ADD CONSTRAINT `student_course_internal_assessment_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses_offered` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1303
1304--
1305-- Constraints for table `student_stream_enrolment_activity`
1306--
1307ALTER TABLE `student_stream_enrolment_activity`
1308 ADD CONSTRAINT `student_stream_enrolment_activity_ibfk_1` FOREIGN KEY (`people_id`) REFERENCES `people` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1309 ADD CONSTRAINT `student_stream_enrolment_activity_ibfk_2` FOREIGN KEY (`stream_id`) REFERENCES `streams_offered` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
1310SET FOREIGN_KEY_CHECKS=1;
1311COMMIT;
1312
1313/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1314/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1315/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;