badlogic

migration script for unit fee details college

Mar 29th, 2017
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 2.49 KB | None | 0 0
  1. INSERT INTO `app_modules` (`mnu_name`, `mnu_desc`, `mnu_icon`, `mnu_parent`, `mnu_ord`, `mnu_link`, `mnu_status`, `mnu_link_info`)
  2. SELECT 'Unit Fee Details', '', '', '96', '51', 'setup.php?statpos=unit_fee_details', '1', 'a:18:{s:8:\"linkpage\";s:9:\"setup.php\";s:7:\"statpos\";s:20:\"unit_fee_details\";s:11:\"querystring\";s:0:\"\";s:14:\"maincontroller\";s:0:\"\";s:18:\"default_controller\";s:0:\"\";s:19:\"controller_filename\";s:47:\"admin/setup/unit_fee_details.controller.php\";s:14:\"class_filename\";s:42:\"admin/setup/unit_fee_details.class.php\";s:10:\"class_name\";s:17:\"clsUnitFeeDetails\";s:17:\"template_filename\";s:40:\"admin/setup/unit_fee_details.tpl.php\";s:21:\"templateform_filename\";s:45:\"admin/setup/unit_fee_details_form.tpl.php\";s:7:\"chkmenu\";s:1:\"1\";s:7:\"chkmain\";N;s:13:\"chkcontroller\";s:1:\"1\";s:8:\"chkclass\";s:1:\"1\";s:11:\"chktemplate\";s:1:\"1\";s:15:\"chktemplateform\";s:1:\"1\";s:5:\"ud_id\";a:4:{i:0;s:1:\"2\";i:1;s:1:\"4\";i:2;s:1:\"3\";i:3;s:1:\"1\";}s:9:\"user_type\";a:2:{i:0;s:19:\"Super Administrator\";i:1;s:13:\"Administrator\";}}'
  3. FROM `app_modules`
  4. WHERE ((`mnu_id` = '205'));
  5.  
  6.  
  7. CREATE TABLE `college_unit_fee_details` (
  8.   `unit_fee_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  9.   `name` varchar(255) NOT NULL,
  10.   `year_level` varchar(255) NOT NULL,
  11.   `type` varchar(255) NOT NULL,
  12.   `amount` float(10) NOT NULL,
  13.   `date` varchar(255) NOT NULL,
  14.   `status` varchar(255) NOT NULL,
  15.   `sy_id` int(10) NOT NULL
  16. );
  17.  
  18.  
  19. INSERT INTO `college_unit_fee_details` (`unit_fee_id`, `name`, `year_level`, `type`, `amount`, `date`, `status`, `sy_id`, `type_unit`) VALUES
  20. (1, 'CCS Non-major',    'First and Second', '1',    1000,   '', '', 0,  'Per Unit'),
  21. (2, 'CCS Major',    'First and Second', '2',    1000,   '', '', 0,  'Per 3 Unit'),
  22. (3, 'CCS Non-major',    'Third and Fourth', '3',    1000,   '', '', 0,  'Per Unit'),
  23. (4, 'CCS Major',    'Third and Fourth', '4',    1000,   '', '', 0,  'Per 3 Unit'),
  24. (5, 'General Collegiate',   'First and Second', '5',    1000,   '', '', 0,  'Per Unit'),
  25. (6, 'General Collegiate',   'Third and Fourth', '6',    1000,   '', '', 0,  'Per Unit'),
  26. (7, 'Computer Subject', 'First and Second', '7',    56, '', '', 0,  'Per 3 Unit'),
  27. (8, 'Computer Subject', 'Third and Fourth', '8',    324,    '', '', 0,  'Per 3 Unit');
  28.  
  29. ALTER TABLE `college_unit_fee_details`
  30. CHANGE `type` `type` varchar(255) COLLATE 'latin1_swedish_ci' NOT NULL COMMENT '1=non major,2 = major, 3 = per 1 unit, 4 = per 3 unit ' AFTER `year_level`;
  31.  
  32.  
  33. ALTER TABLE `college_course_curriculum_2016_2017`
  34. ADD `unit_fee_id` int(10) NOT NULL;
Add Comment
Please, Sign In to add comment