badlogic

college_update_estaba_lea

Feb 13th, 2017
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 27.72 KB | None | 0 0
  1. SET NAMES utf8;
  2. SET time_zone = '+00:00';
  3. SET foreign_key_checks = 0;
  4. SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
  5.  
  6. USE `dps_registrar_db`;
  7.  
  8. DROP TABLE IF EXISTS `file_gradeyearlevel_2016_2017`;
  9. CREATE TABLE `file_gradeyearlevel_2016_2017` (
  10.   `yl_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  11.   `sy_id` int(10) unsigned NOT NULL,
  12.   `dept_id` int(10) unsigned NOT NULL,
  13.   `yl_name` varchar(64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  14.   `yl_shortname` varchar(64) DEFAULT NULL,
  15.   `yl_ordinal` tinyint(3) unsigned DEFAULT NULL,
  16.   `yl_isactive` tinyint(3) unsigned DEFAULT NULL,
  17.   `yl_prevlevel` int(10) unsigned DEFAULT NULL,
  18.   `yl_nextlevel` int(10) unsigned DEFAULT NULL,
  19.   `yl_addwho` varchar(64) DEFAULT NULL,
  20.   `yl_addwhen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  21.   `yl_updatewho` varchar(64) DEFAULT NULL,
  22.   `yl_updatewhen` datetime DEFAULT NULL,
  23.   PRIMARY KEY (`yl_id`),
  24.   KEY `file_yearlevel_FKIndex1` (`dept_id`),
  25.   KEY `sy_id` (`sy_id`)
  26. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  27.  
  28. INSERT INTO `file_gradeyearlevel_2016_2017` (`yl_id`, `sy_id`, `dept_id`, `yl_name`, `yl_shortname`, `yl_ordinal`, `yl_isactive`, `yl_prevlevel`, `yl_nextlevel`, `yl_addwho`, `yl_addwhen`, `yl_updatewho`, `yl_updatewhen`) VALUES
  29. (1, 13, 1,  'Kinder 1', 'Kinder 1', 1,  1,  0,  2,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  30. (2, 13, 1,  'Kinder 2', 'Kinder 2', 2,  1,  1,  3,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  31. (3, 13, 1,  'Grade 1',  'Grade 1',  3,  1,  2,  4,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  32. (4, 13, 1,  'Grade 2',  'Grade 2',  4,  1,  3,  5,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  33. (5, 13, 1,  'Grade 3',  'Grade 3',  5,  1,  4,  6,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  34. (6, 13, 1,  'Grade 4',  'Grade 4',  6,  1,  5,  7,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  35. (7, 13, 1,  'Grade 5',  'Grade 5',  7,  1,  6,  8,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  36. (8, 13, 1,  'Grade 6',  'Grade 6',  8,  1,  7,  9,  NULL,   '2016-02-11 13:09:07',  NULL,   NULL),
  37. (9, 13, 9,  'Grade 7',  'Grade 7',  9,  1,  8,  10, NULL,   '2016-02-11 13:09:07',  'Philjosh', '0000-00-00 00:00:00'),
  38. (10,    13, 9,  'Grade 8',  'Grade 8',  10, 1,  9,  11, NULL,   '2016-02-11 13:09:07',  'Philjosh', '0000-00-00 00:00:00'),
  39. (11,    13, 9,  'Grade 9',  'Grade 9',  11, 1,  10, 12, NULL,   '2016-02-11 13:09:07',  'Philjosh', '0000-00-00 00:00:00'),
  40. (12,    13, 9,  'Grade 10', 'Grade 10', 12, 1,  11, 13, NULL,   '2016-02-11 13:09:07',  'Philjosh', '0000-00-00 00:00:00'),
  41. (13,    13, 2,  'Grade 11', 'Grade 11', 13, 1,  12, 14, NULL,   '2016-02-11 13:09:07',  'ralgee',   '0000-00-00 00:00:00'),
  42. (14,    13, 2,  'Grade 12', 'Grade 12', 14, 1,  13, 19, NULL,   '2016-02-11 13:09:07',  'ralgee',   '0000-00-00 00:00:00'),
  43. (19,    13, 5,  'First Year',   'First Year',   15, 1,  14, 20, NULL,   '2017-02-10 10:15:30',  NULL,   NULL),
  44. (20,    13, 5,  'Second Year',  'Second Year',  16, 1,  19, 21, NULL,   '2017-02-10 10:16:11',  NULL,   NULL),
  45. (21,    13, 5,  'Third Year',   'Third Year',   17, 1,  20, 22, NULL,   '2017-02-10 10:16:57',  NULL,   NULL),
  46. (22,    13, 5,  'Fourth Year',  'Fourth Year',  18, 1,  21, 23, NULL,   '2017-02-10 10:16:57',  NULL,   NULL),
  47. (23,    13, 5,  'Fifth Year',   'Fifth Year',   19, 1,  22, 0,  NULL,   '2017-02-10 10:16:57',  NULL,   NULL);
  48.  
  49. -- 2017-02-14 03:29:23
  50.  
  51.  
  52. -- Adminer 4.2.5 MySQL dump
  53.  
  54. SET NAMES utf8;
  55. SET time_zone = '+00:00';
  56. SET foreign_key_checks = 0;
  57. SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
  58.  
  59. DROP TABLE IF EXISTS `file_department`;
  60. CREATE TABLE `file_department` (
  61.   `dept_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  62.   `dept_name` varchar(45) DEFAULT NULL,
  63.   `dept_desc` varchar(200) DEFAULT NULL,
  64.   `depttype_id` int(10) DEFAULT NULL,
  65.   `dept_ord` tinyint(3) unsigned DEFAULT NULL,
  66.   PRIMARY KEY (`dept_id`)
  67. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  68.  
  69. INSERT INTO `file_department` (`dept_id`, `dept_name`, `dept_desc`, `depttype_id`, `dept_ord`) VALUES
  70. (1, 'Grade School', 'Grade School', 7,  20),
  71. (2, 'Senior High School',   'Senior High School',   7,  40),
  72. (10,    'Early Education',  'Early Education',  7,  10),
  73. (9, 'Junior High School',   'Junior High School',   7,  30),
  74. (26,    'CoPE', 'College of Physical Education',    8,  130),
  75. (18,    'CRT',  'College of Radiologic Technology', 8,  140),
  76. (5, 'College',  'College',  8,  50),
  77. (14,    'CAC',  'College of Accountancy',   8,  60),
  78. (15,    'CON',  'College of Nursing',   8,  129),
  79. (16,    'CBA',  'College of Business Administration',   8,  80),
  80. (13,    'CAS',  'College of Arts and Sciences', 8,  70),
  81. (17,    'CCS',  'College of Computer Studies',  8,  90),
  82. (21,    'COL',  'College of Law',   8,  110),
  83. (20,    'CPT',  'College of Physical Therapy',  8,  120),
  84. (19,    'CED',  'College of Education', 8,  100),
  85. (12,    'Graduate Studies', 'Graduate Studies', 8,  150),
  86. (22,    'Short Courses',    'Short Courses',    8,  160),
  87. (24,    'School of Midwifery',  'School of Midwifery',  8,  170);
  88.  
  89. -- 2017-02-14 06:38:33
  90.  
  91.  
  92. -- Adminer 4.2.5 MySQL dump
  93.  
  94. SET NAMES utf8;
  95. SET time_zone = '+00:00';
  96. SET foreign_key_checks = 0;
  97. SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
  98.  
  99. DROP TABLE IF EXISTS `file_department_type`;
  100. CREATE TABLE `file_department_type` (
  101.   `depttype_id` int(10) NOT NULL AUTO_INCREMENT,
  102.   `depttype_name` varchar(50) NOT NULL,
  103.   PRIMARY KEY (`depttype_id`)
  104. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  105.  
  106. INSERT INTO `file_department_type` (`depttype_id`, `depttype_name`) VALUES
  107. (8, 'College'),
  108. (7, 'Basic Education');
  109.  
  110. -- 2017-02-14 05:28:55
  111.  
  112.  
  113. -- Adminer 4.2.5 MySQL dump
  114.  
  115. SET NAMES utf8;
  116. SET time_zone = '+00:00';
  117. SET foreign_key_checks = 0;
  118. SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
  119.  
  120. DROP TABLE IF EXISTS `college_academic_strand`;
  121. CREATE TABLE `college_academic_strand` (
  122.   `as_id` int(11) NOT NULL AUTO_INCREMENT,
  123.   `at_id` int(9) NOT NULL,
  124.   `as_name` varchar(100) NOT NULL,
  125.   `as_shortname` varchar(100) NOT NULL,
  126.   PRIMARY KEY (`as_id`)
  127. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  128.  
  129. INSERT INTO `college_academic_strand` (`as_id`, `at_id`, `as_name`, `as_shortname`) VALUES
  130. (1, 1,  'Accountancy, Business and Management', 'ABM'),
  131. (2, 1,  'Science, Technology, Engineering, and Mathematics',    'STEM'),
  132. (3, 1,  'Humanities and Social Sciences',   'HUMSS'),
  133. (4, 1,  'General Academic Strand',  'GAS'),
  134. (5, 3,  'Home Economics',   'HE'),
  135. (6, 3,  'Information and Communication Technology', 'ICT'),
  136. (7, 2,  'Arts And Design',  'AD');
  137.  
  138. DROP TABLE IF EXISTS `college_academic_track`;
  139. CREATE TABLE `college_academic_track` (
  140.   `at_id` int(11) NOT NULL AUTO_INCREMENT,
  141.   `at_name` varchar(100) NOT NULL,
  142.   `at_shortname` varchar(100) NOT NULL,
  143.   PRIMARY KEY (`at_id`)
  144. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  145.  
  146. INSERT INTO `college_academic_track` (`at_id`, `at_name`, `at_shortname`) VALUES
  147. (1, 'Academic Track',   'AT'),
  148. (2, 'Arts and Design Track',    'ADT'),
  149. (3, 'Technical- Vocational Livelihood Track',   'TVL');
  150.  
  151. DROP TABLE IF EXISTS `college_add_open_subjects`;
  152. CREATE TABLE `college_add_open_subjects` (
  153.   `caos_id` int(11) NOT NULL AUTO_INCREMENT,
  154.   `yl_id` int(11) NOT NULL COMMENT 'year level',
  155.   `block_id` int(11) NOT NULL COMMENT 'block',
  156.   `cc_id` int(11) NOT NULL COMMENT 'course',
  157.   `dept_id` int(11) NOT NULL COMMENT 'department',
  158.   `ccc_id` int(11) NOT NULL COMMENT 'curriculum',
  159.   `status` int(11) NOT NULL COMMENT '1 = active, 0 = inactive',
  160.   `sy_id` int(11) NOT NULL,
  161.   PRIMARY KEY (`caos_id`)
  162. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  163.  
  164. INSERT INTO `college_add_open_subjects` (`caos_id`, `yl_id`, `block_id`, `cc_id`, `dept_id`, `ccc_id`, `status`, `sy_id`) VALUES
  165. (1, 19, 1,  8,  17, 1,  1,  0),
  166. (2, 19, 1,  8,  17, 2,  1,  0),
  167. (3, 19, 1,  8,  17, 3,  1,  0),
  168. (4, 19, 1,  8,  17, 4,  1,  0),
  169. (5, 19, 20, 8,  17, 1,  1,  0),
  170. (6, 19, 20, 8,  17, 2,  1,  0),
  171. (7, 19, 20, 8,  17, 3,  1,  0),
  172. (8, 19, 20, 8,  17, 4,  1,  0),
  173. (9, 19, 21, 8,  17, 1,  1,  0),
  174. (10,    19, 21, 8,  17, 2,  1,  0),
  175. (11,    19, 21, 8,  17, 3,  1,  0),
  176. (12,    19, 21, 8,  17, 4,  1,  0),
  177. (13,    19, 22, 21, 16, 5,  1,  0),
  178. (14,    19, 22, 21, 16, 6,  1,  0),
  179. (15,    19, 22, 21, 16, 7,  1,  0);
  180.  
  181. DROP TABLE IF EXISTS `college_block_active_semester`;
  182. CREATE TABLE `college_block_active_semester` (
  183.   `cbas_id` int(11) NOT NULL AUTO_INCREMENT,
  184.   `yl_id` int(11) NOT NULL,
  185.   `cc_id` int(11) NOT NULL,
  186.   `dept_id` int(11) NOT NULL,
  187.   `block_name` varchar(255) NOT NULL,
  188.   `ordinal` int(11) NOT NULL,
  189.   `status` int(11) NOT NULL,
  190.   `sy_id` int(11) NOT NULL,
  191.   PRIMARY KEY (`cbas_id`)
  192. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  193.  
  194. INSERT INTO `college_block_active_semester` (`cbas_id`, `yl_id`, `cc_id`, `dept_id`, `block_name`, `ordinal`, `status`, `sy_id`) VALUES
  195. (20,    19, 8,  17, 'BSCS 1A',  1,  1,  13),
  196. (21,    19, 8,  17, 'BSCS 1B',  2,  1,  13),
  197. (22,    19, 21, 16, 'BSBA 1A',  1,  1,  13);
  198.  
  199. DROP TABLE IF EXISTS `college_block_subject_schedule`;
  200. CREATE TABLE `college_block_subject_schedule` (
  201.   `cbss_id` int(10) NOT NULL AUTO_INCREMENT,
  202.   `cs_id` int(10) NOT NULL COMMENT 'college_subjects',
  203.   `css_id` int(10) NOT NULL DEFAULT '0' COMMENT 'college_subject_schedule',
  204.   `cc_id` int(10) NOT NULL COMMENT 'college_course',
  205.   `yl_id` int(10) NOT NULL COMMENT 'year level',
  206.   `csm_id` int(10) NOT NULL COMMENT 'semester id',
  207.   `ccb_id` int(10) NOT NULL COMMENT 'block id',
  208.   PRIMARY KEY (`cbss_id`)
  209. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  210.  
  211. INSERT INTO `college_block_subject_schedule` (`cbss_id`, `cs_id`, `css_id`, `cc_id`, `yl_id`, `csm_id`, `ccb_id`) VALUES
  212. (1, 1,  1,  8,  19, 4,  20),
  213. (2, 2,  2,  8,  19, 4,  20),
  214. (3, 3,  3,  8,  19, 4,  20),
  215. (4, 3,  4,  8,  19, 4,  20),
  216. (5, 1,  5,  8,  19, 4,  21),
  217. (6, 4,  6,  8,  19, 4,  21),
  218. (7, 5,  7,  21, 19, 4,  22),
  219. (8, 6,  8,  21, 19, 4,  22),
  220. (9, 7,  9,  21, 19, 4,  22);
  221.  
  222. DROP TABLE IF EXISTS `college_course`;
  223. CREATE TABLE `college_course` (
  224.   `cc_id` int(11) NOT NULL AUTO_INCREMENT,
  225.   `cc_name` varchar(100) NOT NULL,
  226.   `cc_shortname` varchar(100) NOT NULL,
  227.   `cc_isactive` tinyint(1) NOT NULL,
  228.   `dept_id` int(10) DEFAULT NULL,
  229.   `as_id` int(10) DEFAULT NULL,
  230.   PRIMARY KEY (`cc_id`)
  231. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  232.  
  233. INSERT INTO `college_course` (`cc_id`, `cc_name`, `cc_shortname`, `cc_isactive`, `dept_id`, `as_id`) VALUES
  234. (7, 'Bachelor of Science in Information Technology',    'BSIT', 1,  17, NULL),
  235. (8, 'Bachelor of Science in Computer Science',  'BSCS', 1,  17, NULL),
  236. (9, 'Bachelor of Science in  Nursing',  'BSN',  1,  15, NULL),
  237. (10,    'Doctor in Business Administration ',   'DBA',  1,  12, NULL),
  238. (11,    'Doctor of Education',  'Ed.D', 1,  12, NULL),
  239. (13,    'Master of Arts in Educational Management', 'M.A.Ed.M.',    1,  12, NULL),
  240. (15,    'Bachelor of Secondary Education',  'BSED', 1,  19, NULL),
  241. (21,    'Bachelor of Science in Business Administration',   'BSBA', 1,  16, NULL),
  242. (18,    'Master of Arts in Filipino',   'M.A.Fil.', 1,  12, NULL),
  243. (19,    'Master of Arts in English ',   'M.A.Engl', 1,  12, NULL),
  244. (20,    'Bachelor of Elementary Education', 'BEED', 1,  19, NULL),
  245. (22,    'Bachelor of Science in Accountancy',   'BSA',  0,  14, NULL),
  246. (23,    'Bachelor of Science in Accounting Technology', 'BSAcT',    1,  14, NULL),
  247. (24,    'Bachelor of Science in Hotel and Restaurant Management',   'BSHRM',    1,  16, NULL),
  248. (25,    'Associate in Hotel and Restaurant Management', 'AHRM', 1,  16, NULL),
  249. (27,    'Bachelor of Arts', 'AB',   1,  13, NULL),
  250. (28,    'Bachelor of Science in Psychology',    'BSP',  1,  13, NULL),
  251. (29,    'Bachelor of Science in Mass Communication',    'BSMC', 1,  13, NULL),
  252. (30,    'Bachelor of Science in Mathematics',   'BSMA', 1,  13, NULL),
  253. (31,    'Bachelor of Science in Radiologic Technology', 'BSRT', 1,  18, NULL),
  254. (32,    'Bachelor of Science in Physical Therapy',  'BSPT', 1,  20, NULL),
  255. (33,    'Graduate in Midwifery',    'GM',   1,  24, NULL),
  256. (34,    'Associate in Computer Technology', 'ACT',  1,  17, NULL),
  257. (35,    'Associate in Office Administration',   'AOA',  1,  17, NULL),
  258. (36,    'Caregving Course', 'CG',   1,  22, NULL),
  259. (37,    'Master in Business Administration',    'MBA',  1,  12, NULL),
  260. (39,    'Master of Arts',   'MA',   1,  12, NULL),
  261. (41,    'Master of Arts in Nursing ',   'MAN',  1,  12, NULL),
  262. (42,    'Associate in Radilogic Technology',    'ARad Tech',    1,  18, NULL),
  263. (44,    'Master of Arts in Guidance Counseling ',   'M.A.G.C',  1,  12, NULL);
  264.  
  265. DROP TABLE IF EXISTS `college_course_block`;
  266. CREATE TABLE `college_course_block` (
  267.   `ccb_id` int(10) NOT NULL AUTO_INCREMENT,
  268.   `ccb_shortname` varchar(100) NOT NULL,
  269.   `ccb_name` varchar(100) NOT NULL,
  270.   `ccb_order` int(10) NOT NULL,
  271.   `cc_id` int(10) NOT NULL,
  272.   `yl_id` int(10) NOT NULL,
  273.   `csm_id` int(10) NOT NULL COMMENT 'semester_id',
  274.   PRIMARY KEY (`ccb_id`)
  275. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  276.  
  277.  
  278. DROP TABLE IF EXISTS `college_course_curriculum_2015_2016`;
  279. CREATE TABLE `college_course_curriculum_2015_2016` (
  280.   `ccc_id` int(11) NOT NULL AUTO_INCREMENT,
  281.   `cc_id` int(10) NOT NULL,
  282.   `yl_id` int(10) NOT NULL,
  283.   `csm_id` int(10) NOT NULL,
  284.   `csh_id` int(10) NOT NULL,
  285.   `ccc_lec_unit` int(10) NOT NULL DEFAULT '0',
  286.   `ccc_lab_unit` int(10) NOT NULL DEFAULT '0',
  287.   `ccc_lab_fee` int(10) NOT NULL DEFAULT '0',
  288.   `ccc_prereq_id` int(10) NOT NULL,
  289.   `is_included` int(1) NOT NULL,
  290.   `ccc_order` int(10) NOT NULL,
  291.   PRIMARY KEY (`ccc_id`)
  292. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  293.  
  294.  
  295. DROP TABLE IF EXISTS `college_course_curriculum_2016_2017`;
  296. CREATE TABLE `college_course_curriculum_2016_2017` (
  297.   `ccc_id` int(11) NOT NULL AUTO_INCREMENT,
  298.   `cc_id` int(10) NOT NULL,
  299.   `yl_id` int(10) NOT NULL,
  300.   `csm_id` int(10) NOT NULL,
  301.   `csh_id` int(10) NOT NULL,
  302.   `ccc_lec_unit` int(10) NOT NULL DEFAULT '0',
  303.   `ccc_lab_unit` int(10) NOT NULL DEFAULT '0',
  304.   `ccc_fee_name` varchar(100) DEFAULT NULL,
  305.   `ccc_fee_value` float NOT NULL DEFAULT '0',
  306.   `ccc_fee_unit` int(10) NOT NULL DEFAULT '0',
  307.   `ccc_prereq_id` int(10) NOT NULL,
  308.   `is_included` int(1) NOT NULL,
  309.   `ccc_order` int(10) NOT NULL,
  310.   PRIMARY KEY (`ccc_id`)
  311. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  312.  
  313. INSERT INTO `college_course_curriculum_2016_2017` (`ccc_id`, `cc_id`, `yl_id`, `csm_id`, `csh_id`, `ccc_lec_unit`, `ccc_lab_unit`, `ccc_fee_name`, `ccc_fee_value`, `ccc_fee_unit`, `ccc_prereq_id`, `is_included`, `ccc_order`) VALUES
  314. (1, 8,  19, 4,  23, 3,  0,  NULL,   0,  0,  0,  10, 1),
  315. (2, 8,  19, 4,  13, 3,  0,  NULL,   0,  0,  0,  20, 2),
  316. (3, 8,  19, 4,  21, 3,  0,  NULL,   0,  0,  0,  20, 3),
  317. (4, 8,  19, 4,  95, 3,  0,  NULL,   0,  0,  0,  20, 4),
  318. (5, 21, 19, 4,  221,    3,  0,  NULL,   0,  0,  0,  20, 1),
  319. (6, 21, 19, 4,  23, 3,  0,  NULL,   0,  0,  0,  10, 2),
  320. (7, 21, 19, 4,  21, 3,  0,  NULL,   0,  0,  0,  20, 3);
  321.  
  322. DROP TABLE IF EXISTS `college_course_curriculum_header`;
  323. CREATE TABLE `college_course_curriculum_header` (
  324.   `ccch_id` int(10) NOT NULL AUTO_INCREMENT,
  325.   `sy_id` int(10) NOT NULL,
  326.   `ccch_name` varchar(100) NOT NULL,
  327.   `cc_id` int(10) NOT NULL,
  328.   `is_active` tinyint(1) NOT NULL,
  329.   PRIMARY KEY (`ccch_id`)
  330. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  331.  
  332. INSERT INTO `college_course_curriculum_header` (`ccch_id`, `sy_id`, `ccch_name`, `cc_id`, `is_active`) VALUES
  333. (1, 13, 'Bachelor of Science in Computer Science Effective SY 2014-2015',   8,  1),
  334. (2, 13, 'Bachelor of Science in Business Administration Effective SY 2012-2013',    21, 1);
  335.  
  336. DROP TABLE IF EXISTS `college_course_header`;
  337. CREATE TABLE `college_course_header` (
  338.   `cch_id` bigint(20) NOT NULL AUTO_INCREMENT,
  339.   `cc_id` varchar(100) NOT NULL,
  340.   `cc_section` varchar(10) NOT NULL,
  341.   `cch_semester` varchar(10) NOT NULL,
  342.   PRIMARY KEY (`cch_id`)
  343. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  344.  
  345.  
  346. DROP TABLE IF EXISTS `college_curriculum_prereqs_2016_2017`;
  347. CREATE TABLE `college_curriculum_prereqs_2016_2017` (
  348.   `ccc_id` int(11) NOT NULL,
  349.   `cccp_id` int(11) NOT NULL
  350. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  351.  
  352.  
  353. DROP TABLE IF EXISTS `college_editsubject_history_2016_2017`;
  354. CREATE TABLE `college_editsubject_history_2016_2017` (
  355.   `ceh_id` int(11) NOT NULL AUTO_INCREMENT,
  356.   `ccc_id` int(11) NOT NULL,
  357.   `new_ccc_id` int(11) NOT NULL,
  358.   `csh_id` int(11) NOT NULL,
  359.   `new_csh_id` int(11) NOT NULL,
  360.   `css_id` int(11) NOT NULL,
  361.   `new_css_id` int(11) NOT NULL,
  362.   `remarks` varchar(200) NOT NULL,
  363.   `yl_id` int(11) NOT NULL,
  364.   `csm_id` int(11) NOT NULL,
  365.   `sai_id` int(11) NOT NULL,
  366.   PRIMARY KEY (`ceh_id`)
  367. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  368.  
  369.  
  370. DROP TABLE IF EXISTS `college_enrolled_subjects_2016_2017`;
  371. CREATE TABLE `college_enrolled_subjects_2016_2017` (
  372.   `cses_id` int(10) NOT NULL AUTO_INCREMENT,
  373.   `ccc_id` int(11) NOT NULL,
  374.   `csh_id` int(11) NOT NULL,
  375.   `css_id` varchar(255) NOT NULL,
  376.   `sai_id` int(10) NOT NULL,
  377.   `yl_id` int(10) NOT NULL,
  378.   `csm_id` int(10) NOT NULL,
  379.   PRIMARY KEY (`cses_id`),
  380.   KEY `ccc_id` (`ccc_id`)
  381. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  382.  
  383. INSERT INTO `college_enrolled_subjects_2016_2017` (`cses_id`, `ccc_id`, `csh_id`, `css_id`, `sai_id`, `yl_id`, `csm_id`) VALUES
  384. (52,    7,  21, '9',    9979,   19, 4),
  385. (54,    1,  23, '1',    9979,   19, 4);
  386.  
  387. DROP TABLE IF EXISTS `college_payment_fee_header`;
  388. CREATE TABLE `college_payment_fee_header` (
  389.   `college_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  390.   `pfh_id` int(100) NOT NULL,
  391.   `college_semester_id` int(100) NOT NULL,
  392.   `college_department_id` int(100) NOT NULL,
  393.   `college_course_id` int(100) NOT NULL,
  394.   `yl_id` int(11) NOT NULL,
  395.   PRIMARY KEY (`college_payment_id`)
  396. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  397.  
  398. INSERT INTO `college_payment_fee_header` (`college_payment_id`, `pfh_id`, `college_semester_id`, `college_department_id`, `college_course_id`, `yl_id`) VALUES
  399. (1, 621,    4,  5,  8,  19);
  400.  
  401. DROP TABLE IF EXISTS `college_semester`;
  402. CREATE TABLE `college_semester` (
  403.   `cs_id` int(11) NOT NULL AUTO_INCREMENT,
  404.   `cs_name` varchar(50) NOT NULL,
  405.   `cs_description` varchar(50) NOT NULL,
  406.   `cs_ordinal` int(10) NOT NULL,
  407.   `cs_isactive` int(1) NOT NULL COMMENT '1=active',
  408.   `cs_sy` varchar(255) NOT NULL,
  409.   `cs_sy_id` varchar(11) NOT NULL,
  410.   PRIMARY KEY (`cs_id`)
  411. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  412.  
  413. INSERT INTO `college_semester` (`cs_id`, `cs_name`, `cs_description`, `cs_ordinal`, `cs_isactive`, `cs_sy`, `cs_sy_id`) VALUES
  414. (4, 'First Semester',   'test', 1,  1,  '2016-2017',    '13'),
  415. (11,    'Second Semester',  '', 0,  0,  '2016-2017',    '');
  416.  
  417. DROP TABLE IF EXISTS `college_student_course_headers`;
  418. CREATE TABLE `college_student_course_headers` (
  419.   `cc_header_id` int(11) NOT NULL AUTO_INCREMENT,
  420.   `cc_student_id` int(50) DEFAULT NULL,
  421.   `cc_student_course` int(50) DEFAULT NULL,
  422.   `cc_student_track` int(50) DEFAULT NULL,
  423.   `cc_student_strand` int(50) DEFAULT NULL,
  424.   `yl_id` int(50) DEFAULT NULL COMMENT 'Year level',
  425.   `csm_id` int(50) DEFAULT NULL COMMENT 'Semester',
  426.   `ccb_id` int(50) DEFAULT NULL COMMENT 'block',
  427.   `ccch_id` int(10) DEFAULT NULL COMMENT 'curriculum',
  428.   PRIMARY KEY (`cc_header_id`)
  429. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  430.  
  431. INSERT INTO `college_student_course_headers` (`cc_header_id`, `cc_student_id`, `cc_student_course`, `cc_student_track`, `cc_student_strand`, `yl_id`, `csm_id`, `ccb_id`, `ccch_id`) VALUES
  432. (2, 10304,  8,  0,  0,  19, NULL,   NULL,   1),
  433. (5, 9979,   21, NULL,   0,  19, NULL,   NULL,   2);
  434.  
  435. DROP TABLE IF EXISTS `college_subject_headers`;
  436. CREATE TABLE `college_subject_headers` (
  437.   `college_headers_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  438.   `college_department` int(55) NOT NULL,
  439.   `college_subject_id` int(55) NOT NULL,
  440.   PRIMARY KEY (`college_headers_subject_id`)
  441. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  442.  
  443. INSERT INTO `college_subject_headers` (`college_headers_subject_id`, `college_department`, `college_subject_id`) VALUES
  444. (13,    5,  58),
  445. (16,    5,  61),
  446. (17,    6,  62),
  447. (18,    5,  52),
  448. (19,    5,  53),
  449. (20,    5,  54),
  450. (21,    5,  55),
  451. (22,    5,  56),
  452. (23,    5,  57),
  453. (24,    5,  58),
  454. (25,    5,  59),
  455. (26,    5,  60),
  456. (27,    5,  61),
  457. (28,    5,  62),
  458. (29,    5,  63),
  459. (30,    0,  64),
  460. (31,    5,  65),
  461. (32,    5,  56),
  462. (33,    5,  67),
  463. (34,    5,  68),
  464. (35,    5,  69),
  465. (36,    5,  70),
  466. (37,    5,  71),
  467. (38,    5,  72),
  468. (39,    12, 57),
  469. (40,    5,  57),
  470. (41,    5,  75),
  471. (42,    5,  76),
  472. (43,    5,  77),
  473. (44,    5,  78),
  474. (45,    5,  79),
  475. (46,    5,  60),
  476. (47,    5,  61),
  477. (48,    5,  62),
  478. (49,    5,  83),
  479. (50,    5,  0),
  480. (51,    5,  84),
  481. (52,    5,  85),
  482. (53,    5,  86),
  483. (54,    5,  87),
  484. (55,    5,  88),
  485. (56,    5,  89),
  486. (57,    5,  90),
  487. (58,    5,  70),
  488. (59,    5,  0),
  489. (60,    5,  67),
  490. (61,    5,  0),
  491. (62,    5,  0),
  492. (63,    5,  93),
  493. (64,    5,  94),
  494. (65,    5,  95),
  495. (66,    5,  96),
  496. (67,    5,  97),
  497. (68,    5,  71),
  498. (69,    5,  99),
  499. (70,    5,  100),
  500. (71,    5,  101),
  501. (72,    5,  102),
  502. (73,    5,  103),
  503. (74,    5,  104),
  504. (75,    5,  105),
  505. (76,    5,  0),
  506. (77,    5,  106),
  507. (78,    5,  107),
  508. (79,    5,  108),
  509. (80,    5,  109),
  510. (81,    5,  110),
  511. (82,    5,  111),
  512. (83,    5,  112),
  513. (84,    5,  0),
  514. (85,    5,  113),
  515. (86,    5,  114),
  516. (87,    5,  115),
  517. (88,    5,  0),
  518. (89,    5,  116),
  519. (90,    5,  0),
  520. (91,    5,  117),
  521. (92,    5,  118),
  522. (93,    5,  119),
  523. (94,    5,  120),
  524. (95,    5,  82),
  525. (96,    5,  81),
  526. (97,    5,  124),
  527. (98,    5,  125),
  528. (99,    5,  125),
  529. (100,   5,  127),
  530. (101,   5,  128),
  531. (102,   5,  129),
  532. (103,   5,  130),
  533. (104,   5,  131),
  534. (105,   5,  132),
  535. (106,   5,  133),
  536. (107,   5,  134),
  537. (108,   5,  135),
  538. (109,   5,  136),
  539. (110,   5,  137),
  540. (111,   5,  138),
  541. (112,   5,  139),
  542. (113,   5,  140),
  543. (114,   5,  141),
  544. (115,   5,  142),
  545. (116,   5,  143),
  546. (117,   5,  144),
  547. (118,   5,  145),
  548. (119,   5,  146),
  549. (120,   5,  147),
  550. (121,   5,  148),
  551. (122,   5,  149),
  552. (123,   5,  150),
  553. (124,   5,  151),
  554. (125,   5,  152),
  555. (126,   5,  152),
  556. (127,   5,  154),
  557. (128,   5,  154),
  558. (129,   5,  156),
  559. (130,   5,  154),
  560. (131,   5,  156),
  561. (132,   5,  156),
  562. (133,   5,  156),
  563. (134,   5,  161),
  564. (135,   5,  162),
  565. (136,   5,  163),
  566. (137,   5,  164),
  567. (138,   5,  165),
  568. (139,   5,  166),
  569. (140,   5,  167),
  570. (141,   5,  168),
  571. (142,   5,  169),
  572. (143,   5,  170),
  573. (144,   5,  171),
  574. (145,   5,  172),
  575. (146,   5,  173),
  576. (147,   5,  174),
  577. (148,   5,  175),
  578. (149,   5,  176),
  579. (150,   5,  177),
  580. (151,   5,  178),
  581. (152,   5,  179),
  582. (153,   5,  180),
  583. (154,   5,  181),
  584. (155,   5,  182),
  585. (156,   5,  183),
  586. (157,   5,  184),
  587. (158,   5,  185),
  588. (159,   5,  186),
  589. (160,   5,  187),
  590. (161,   5,  188),
  591. (162,   5,  189),
  592. (163,   5,  190),
  593. (164,   5,  191),
  594. (165,   5,  192),
  595. (166,   5,  193),
  596. (167,   5,  194),
  597. (168,   5,  195),
  598. (169,   5,  196),
  599. (170,   5,  197),
  600. (171,   5,  198),
  601. (172,   5,  0),
  602. (173,   5,  0),
  603. (174,   5,  0),
  604. (175,   5,  0),
  605. (176,   5,  0),
  606. (177,   5,  186),
  607. (178,   5,  0),
  608. (179,   5,  0),
  609. (180,   5,  0),
  610. (181,   5,  0),
  611. (182,   5,  0),
  612. (183,   5,  0),
  613. (184,   5,  0),
  614. (185,   5,  0),
  615. (186,   5,  0),
  616. (187,   5,  0),
  617. (188,   5,  198),
  618. (189,   5,  0),
  619. (190,   5,  160),
  620. (191,   5,  159),
  621. (192,   5,  200),
  622. (193,   5,  158),
  623. (194,   5,  0),
  624. (195,   5,  0),
  625. (196,   5,  201),
  626. (197,   5,  202),
  627. (198,   5,  203),
  628. (199,   5,  204),
  629. (200,   5,  205),
  630. (201,   5,  206),
  631. (202,   5,  207),
  632. (203,   5,  208),
  633. (204,   5,  209),
  634. (205,   5,  210),
  635. (206,   5,  211),
  636. (207,   5,  212),
  637. (208,   5,  213),
  638. (209,   5,  214),
  639. (210,   5,  215),
  640. (211,   5,  214),
  641. (212,   5,  217),
  642. (213,   5,  218),
  643. (214,   5,  219),
  644. (215,   5,  220),
  645. (216,   5,  221),
  646. (217,   5,  222),
  647. (218,   5,  223),
  648. (219,   5,  224),
  649. (220,   5,  225),
  650. (221,   5,  226),
  651. (222,   5,  227),
  652. (223,   5,  228),
  653. (224,   5,  229),
  654. (225,   5,  230),
  655. (226,   5,  231),
  656. (227,   5,  232),
  657. (228,   5,  233),
  658. (229,   5,  234),
  659. (230,   5,  235),
  660. (231,   5,  236),
  661. (232,   5,  237),
  662. (233,   5,  238),
  663. (234,   5,  239),
  664. (235,   5,  240),
  665. (236,   5,  241),
  666. (237,   5,  242),
  667. (238,   5,  243),
  668. (239,   5,  244),
  669. (240,   5,  245),
  670. (241,   5,  246),
  671. (242,   5,  247),
  672. (243,   5,  248),
  673. (244,   5,  249),
  674. (245,   5,  250),
  675. (246,   5,  251),
  676. (247,   5,  252),
  677. (248,   5,  253),
  678. (249,   5,  254),
  679. (250,   5,  255),
  680. (251,   5,  0),
  681. (252,   5,  0),
  682. (253,   5,  0),
  683. (254,   5,  0),
  684. (255,   5,  0),
  685. (256,   5,  0),
  686. (257,   5,  0),
  687. (258,   5,  0),
  688. (259,   5,  0),
  689. (260,   5,  0),
  690. (261,   5,  256),
  691. (262,   5,  258),
  692. (263,   5,  259),
  693. (264,   5,  260),
  694. (265,   5,  260),
  695. (266,   5,  262),
  696. (267,   5,  264),
  697. (268,   5,  262),
  698. (269,   5,  266),
  699. (270,   5,  267),
  700. (271,   0,  268),
  701. (272,   0,  269),
  702. (273,   0,  271),
  703. (274,   0,  272),
  704. (275,   0,  274);
  705.  
  706. DROP TABLE IF EXISTS `college_subject_schedule`;
  707. CREATE TABLE `college_subject_schedule` (
  708.   `college_subject_schedule_id` int(11) NOT NULL AUTO_INCREMENT,
  709.   `ccc_id` int(11) NOT NULL,
  710.   `csh_id` int(11) NOT NULL,
  711.   `college_day` varchar(200) NOT NULL,
  712.   `college_time_in` varchar(10) NOT NULL,
  713.   `college_time_out` varchar(10) NOT NULL,
  714.   `college_room_id` int(10) NOT NULL,
  715.   `college_professor_id` int(10) NOT NULL,
  716.   `college_course_id` int(10) NOT NULL,
  717.   `college_year_level` int(10) NOT NULL,
  718.   `college_sem_id` int(10) NOT NULL,
  719.   PRIMARY KEY (`college_subject_schedule_id`)
  720. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  721.  
  722. INSERT INTO `college_subject_schedule` (`college_subject_schedule_id`, `ccc_id`, `csh_id`, `college_day`, `college_time_in`, `college_time_out`, `college_room_id`, `college_professor_id`, `college_course_id`, `college_year_level`, `college_sem_id`) VALUES
  723. (1, 1,  23, '[{\"sunday\":0,\"monday\":1,\"tuesday\":1,\"wednesday\":0,\"thursday\":0,\"friday\":0,\"saturday\":0}]',   '7:00 AM',  '9:00 AM',  33, 24, 8,  19, 4),
  724. (2, 2,  13, '[{\"sunday\":0,\"monday\":0,\"tuesday\":0,\"wednesday\":1,\"thursday\":1,\"friday\":0,\"saturday\":0}]',   '9:00 AM',  '12:00 PM', 36, 25, 8,  19, 4),
  725. (3, 3,  21, '[{\"sunday\":0,\"monday\":0,\"tuesday\":0,\"wednesday\":0,\"thursday\":1,\"friday\":0,\"saturday\":1}]',   '1:00 PM',  '3:00 PM',  36, 10, 8,  19, 4),
  726. (4, 3,  21, '[{\"sunday\":0,\"monday\":0,\"tuesday\":0,\"wednesday\":0,\"thursday\":0,\"friday\":0,\"saturday\":1}]',   '5:00 PM',  '7:00 PM',  38, 4,  8,  19, 4),
  727. (5, 1,  23, '[{\"sunday\":0,\"monday\":0,\"tuesday\":0,\"wednesday\":1,\"thursday\":1,\"friday\":0,\"saturday\":0}]',   '1:00 PM',  '5:00 PM',  33, 0,  8,  19, 4),
  728. (6, 4,  95, '[{\"sunday\":0,\"monday\":0,\"tuesday\":1,\"wednesday\":0,\"thursday\":0,\"friday\":0,\"saturday\":0}]',   '2:45 PM',  '6:00 PM',  24, 29, 8,  19, 4),
  729. (7, 5,  221,    '[{\"sunday\":0,\"monday\":0,\"tuesday\":0,\"wednesday\":0,\"thursday\":1,\"friday\":0,\"saturday\":0}]',   '1:00 PM',  '4:00 PM',  52, 7,  21, 19, 4),
  730. (8, 6,  23, '[{\"sunday\":0,\"monday\":0,\"tuesday\":0,\"wednesday\":1,\"thursday\":0,\"friday\":0,\"saturday\":0}]',   '8:30 AM',  '12:00 PM', 37, 32, 21, 19, 4),
  731. (9, 7,  21, '[{\"sunday\":0,\"monday\":0,\"tuesday\":1,\"wednesday\":0,\"thursday\":1,\"friday\":0,\"saturday\":0}]',   '2:45 PM',  '6:00 PM',  34, 32, 21, 19, 4);
  732.  
  733. DROP TABLE IF EXISTS `college_subject_size`;
  734. CREATE TABLE `college_subject_size` (
  735.   `csize_id` int(11) NOT NULL AUTO_INCREMENT,
  736.   `csh_id` int(11) NOT NULL,
  737.   `csize_size` int(11) NOT NULL,
  738.   `ccb_id` int(11) NOT NULL,
  739.   PRIMARY KEY (`csize_id`)
  740. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  741.  
  742. INSERT INTO `college_subject_size` (`csize_id`, `csh_id`, `csize_size`, `ccb_id`) VALUES
  743. (1, 23, 1,  20),
  744. (2, 13, 1,  20),
  745. (3, 21, 1,  20),
  746. (4, 95, 1,  20),
  747. (5, 23, 1,  21),
  748. (6, 13, 1,  21);
  749.  
  750. DROP TABLE IF EXISTS `college_transaction_header`;
  751. CREATE TABLE `college_transaction_header` (
  752.   `cth_id` int(11) NOT NULL AUTO_INCREMENT,
  753.   `cs_transaction_id` int(11) NOT NULL,
  754.   `cs_id` int(11) NOT NULL,
  755.   `cs_th_status` int(11) NOT NULL,
  756.   `cs_start_date` varchar(255) NOT NULL,
  757.   `cs_end_date` varchar(255) NOT NULL,
  758.   PRIMARY KEY (`cth_id`),
  759.   KEY `cs_transaction_id` (`cs_transaction_id`),
  760.   KEY `cs_id` (`cs_id`),
  761.   CONSTRAINT `college_transaction_header_ibfk_1` FOREIGN KEY (`cs_transaction_id`) REFERENCES `college_transaction_schedule` (`cs_transaction_id`),
  762.   CONSTRAINT `college_transaction_header_ibfk_2` FOREIGN KEY (`cs_id`) REFERENCES `college_semester` (`cs_id`)
  763. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  764.  
  765. INSERT INTO `college_transaction_header` (`cth_id`, `cs_transaction_id`, `cs_id`, `cs_th_status`, `cs_start_date`, `cs_end_date`) VALUES
  766. (2, 1,  4,  1,  '02-06-2017',   '02-20-2017');
  767.  
  768. DROP TABLE IF EXISTS `college_transaction_schedule`;
  769. CREATE TABLE `college_transaction_schedule` (
  770.   `cs_transaction_id` int(11) NOT NULL AUTO_INCREMENT,
  771.   `cs_transaction_name` varchar(255) NOT NULL,
  772.   `status` varchar(255) NOT NULL,
  773.   PRIMARY KEY (`cs_transaction_id`)
  774. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  775.  
  776. INSERT INTO `college_transaction_schedule` (`cs_transaction_id`, `cs_transaction_name`, `status`) VALUES
  777. (1, 'Semester Enrollment',  '1'),
  778. (2, 'Adding/Dropping/Changing', '1');
  779.  
  780. DROP TABLE IF EXISTS `college_yearlevel_sems_2015_2016`;
  781. CREATE TABLE `college_yearlevel_sems_2015_2016` (
  782.   `cys_id` int(10) NOT NULL AUTO_INCREMENT,
  783.   `cc_id` int(10) NOT NULL,
  784.   `yl_id` int(10) NOT NULL,
  785.   `csm_id` int(10) NOT NULL,
  786.   `dept_id` int(10) NOT NULL,
  787.   PRIMARY KEY (`cys_id`)
  788. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  789.  
  790.  
  791. DROP TABLE IF EXISTS `college_yearlevel_sems_2016_2017`;
  792. CREATE TABLE `college_yearlevel_sems_2016_2017` (
  793.   `cys_id` int(10) NOT NULL AUTO_INCREMENT,
  794.   `cc_id` int(10) NOT NULL,
  795.   `yl_id` int(10) NOT NULL,
  796.   `csm_id` int(10) NOT NULL,
  797.   `dept_id` int(10) NOT NULL,
  798.   PRIMARY KEY (`cys_id`)
  799. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  800.  
  801. INSERT INTO `college_yearlevel_sems_2016_2017` (`cys_id`, `cc_id`, `yl_id`, `csm_id`, `dept_id`) VALUES
  802. (1, 21, 19, 4,  16),
  803. (2, 21, 19, 4,  16);
  804.  
  805. -- 2017-02-14 05:41:34
  806.  
  807. INSERT INTO `college_semester` (`cs_name`, `cs_description`, `cs_ordinal`, `cs_isactive`, `cs_sy`, `cs_sy_id`)
  808. VALUES ('Summer', 'Summer', '2', '1', '2016-2017', '13');
Add Comment
Please, Sign In to add comment