forked from science-ation/science-ation
998fe35d67
number, and an option to create numbers automatically - Completely remove all references (hopefully) to the Tour ID - Add a Tour type report - Rework the student report query so it actually makes sense. It really should be a whole bunch of left joins based on the students. Using comma (cross) joins creates situations where if the right side of the join doesn't have information, it wipes out the left side. (Happened before with emergency contact info). - Remove the (two) old custom tour reports - Add 4 new tour reports to the database: - ALL tours for the committee, tour list for students, student emergency contact info for tour coordinators, and a list of tour assignments for students
71 lines
5.6 KiB
SQL
71 lines
5.6 KiB
SQL
ALTER TABLE `tours` ADD `num` VARCHAR( 16 ) NOT NULL AFTER `name` ;
|
|
|
|
INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES
|
|
('', '38', 'Tours -- All Tour Information', 'A listing of just the tours and all related info, no student assignments or anything.', 'The Grant Brothers', 'tour');
|
|
INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES
|
|
('', LAST_INSERT_ID(), 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'col', 0, 'tour_num', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 1, 'tour_name', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 2, 'tour_capacity', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 3, 'tour_mingrade', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 4, 'tour_maxgrade', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 5, 'tour_desc', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 6, 'tour_location', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 7, 'tour_contact', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'sort', 0, 'tour_name', '', 0, 0, 0, 0, 0, '', ' ');
|
|
|
|
INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES
|
|
('', '39', 'Tours -- Available Tours', 'A list of just the tour names and numbers for fair day', 'The Grant Brothers', 'tour');
|
|
INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES
|
|
('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'col', 0, 'tour_num', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 1, 'tour_name', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'sort', 0, 'tour_id', '', 0, 0, 0, 0, 0, '', ' ');
|
|
|
|
INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES
|
|
('', '40', 'Tours -- Student Emergency Contact Information', 'Emergency contact information for each tour, each tour starting on a new page.', 'The Grant Brothers', 'student');
|
|
INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES
|
|
('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 1, 'namefl', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 2, 'emerg_name', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 3, 'emerg_relation', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 4, 'emerg_phone', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'group', 0, 'tour_assign_numname', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', ' ');
|
|
|
|
INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES
|
|
('', '41', 'Tours -- Student Tour Assignments', 'Participant and Tour Assignments, grouped by age category, sorted by project number', 'The Grant Brothers', 'student');
|
|
INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES
|
|
('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''),
|
|
('', LAST_INSERT_ID(), 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 1, 'namefl', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'col', 2, 'tour_assign_numname', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', ' '),
|
|
('', LAST_INSERT_ID(), 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ' ');
|
|
|