Lines 5632-5641
if(C4::Context->preference("Version") < TransformToNum($DBversion) ) {
Link Here
|
5632 |
print "NOTE: The URL of your remote opac css file has been moved to preference opaclayoutstylesheet.\n"; |
5632 |
print "NOTE: The URL of your remote opac css file has been moved to preference opaclayoutstylesheet.\n"; |
5633 |
} |
5633 |
} |
5634 |
print "Upgrade to $DBversion done (BZ 8263: Make OPAC stylesheet preferences more consistent)\n"; |
5634 |
print "Upgrade to $DBversion done (BZ 8263: Make OPAC stylesheet preferences more consistent)\n"; |
5635 |
$DBversion = "3.07.00.XXX"; |
5635 |
SetVersion($DBversion); |
|
|
5636 |
} |
5636 |
|
5637 |
|
|
|
5638 |
$DBversion = "3.09.00.XXX"; |
5637 |
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { |
5639 |
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { |
5638 |
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo'"); |
5640 |
$dbh->do("INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('UseCourseReserves', '0', NULL, 'Enable the course reserves feature.', 'YesNo')"); |
5639 |
$dbh->do("INSERT INTO userflags (bit,flag,flagdesc,defaulton) VALUES ('18','coursereserves','Course Reserves','0')"); |
5641 |
$dbh->do("INSERT INTO userflags (bit,flag,flagdesc,defaulton) VALUES ('18','coursereserves','Course Reserves','0')"); |
5640 |
$dbh->do(" |
5642 |
$dbh->do(" |
5641 |
CREATE TABLE `courses` ( |
5643 |
CREATE TABLE `courses` ( |
Lines 5652-5665
CREATE TABLE `courses` (
Link Here
|
5652 |
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
5654 |
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
5653 |
PRIMARY KEY (`course_id`) |
5655 |
PRIMARY KEY (`course_id`) |
5654 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
5656 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
|
5657 |
"); |
5655 |
|
5658 |
|
|
|
5659 |
$dbh->do(" |
5656 |
CREATE TABLE `course_instructors` ( |
5660 |
CREATE TABLE `course_instructors` ( |
5657 |
`course_id` int(11) NOT NULL, |
5661 |
`course_id` int(11) NOT NULL, |
5658 |
`borrowernumber` int(11) NOT NULL, |
5662 |
`borrowernumber` int(11) NOT NULL, |
5659 |
PRIMARY KEY (`course_id`,`borrowernumber`), |
5663 |
PRIMARY KEY (`course_id`,`borrowernumber`), |
5660 |
KEY `borrowernumber` (`borrowernumber`) |
5664 |
KEY `borrowernumber` (`borrowernumber`) |
5661 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
5665 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
|
5666 |
"); |
5662 |
|
5667 |
|
|
|
5668 |
$dbh->do(" |
5663 |
CREATE TABLE `course_items` ( |
5669 |
CREATE TABLE `course_items` ( |
5664 |
`ci_id` int(11) NOT NULL AUTO_INCREMENT, |
5670 |
`ci_id` int(11) NOT NULL AUTO_INCREMENT, |
5665 |
`itemnumber` int(11) NOT NULL, |
5671 |
`itemnumber` int(11) NOT NULL, |
Lines 5672-5678
CREATE TABLE `course_items` (
Link Here
|
5672 |
PRIMARY KEY (`ci_id`), |
5678 |
PRIMARY KEY (`ci_id`), |
5673 |
UNIQUE KEY `itemnumber` (`itemnumber`) |
5679 |
UNIQUE KEY `itemnumber` (`itemnumber`) |
5674 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
5680 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
|
5681 |
"); |
5675 |
|
5682 |
|
|
|
5683 |
$dbh->do(" |
5676 |
CREATE TABLE `course_reserves` ( |
5684 |
CREATE TABLE `course_reserves` ( |
5677 |
`cr_id` int(11) NOT NULL AUTO_INCREMENT, |
5685 |
`cr_id` int(11) NOT NULL AUTO_INCREMENT, |
5678 |
`course_id` int(11) NOT NULL, |
5686 |
`course_id` int(11) NOT NULL, |
Lines 5684-5696
CREATE TABLE `course_reserves` (
Link Here
|
5684 |
UNIQUE KEY `psuedo_key` (`course_id`,`ci_id`), |
5692 |
UNIQUE KEY `psuedo_key` (`course_id`,`ci_id`), |
5685 |
KEY `course_id` (`course_id`) |
5693 |
KEY `course_id` (`course_id`) |
5686 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
5694 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
|
5695 |
"); |
5687 |
|
5696 |
|
|
|
5697 |
$dbh->do(" |
5688 |
INSERT INTO permissions (module_bit, code, description) VALUES |
5698 |
INSERT INTO permissions (module_bit, code, description) VALUES |
5689 |
(18, 'manage_courses', 'Add, edit and delete courses'), |
5699 |
(18, 'manage_courses', 'Add, edit and delete courses'), |
5690 |
(18, 'add_reserves', 'Add course reserves'), |
5700 |
(18, 'add_reserves', 'Add course reserves'), |
5691 |
(18, 'delete_reserves', 'Remove course reserves') |
5701 |
(18, 'delete_reserves', 'Remove course reserves') |
5692 |
; |
5702 |
; |
5693 |
|
|
|
5694 |
"); |
5703 |
"); |
5695 |
|
5704 |
|
5696 |
print "Upgrade to $DBversion done (Add Course Reserves ( system preference UseCourseReserves ))\n"; |
5705 |
print "Upgrade to $DBversion done (Add Course Reserves ( system preference UseCourseReserves ))\n"; |
5697 |
- |
|
|