$tabsysprefs{NotifyBorrowerDeparture}="Patrons";
$tabsysprefs{AddPatronLists}="Patrons";
$tabsysprefs{PatronsPerPage}="Patrons";
+ $tabsysprefs{ExtendedPatronAttributes}="Patrons";
# I18N/L10N
$tabsysprefs{dateformat}="I18N/L10N";
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GranularPermissions','0','Use detailed staff user permissions',NULL,'YesNo');
INSERT INTO `systempreferences` (variable, value,options,type, explanation) VALUES ('AddPatronLists','categorycode','categorycode|category_type','Choice','Allow user to choose what list to pick up from when adding patrons');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributes','0','Use extended patron IDs and attributes',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACItemHolds','1','Si activé, les adhérents peuvent placer des réservations sur un exemplaire spécifique. Sinon, il ne peuvent que réserver le prochain disponible.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GranularPermissions','0','Use detailed staff user permissions',NULL,'YesNo');
INSERT INTO `systempreferences` (variable, value,options,type, explanation) VALUES ('AddPatronLists','categorycode','categorycode|category_type','Choice','Slectionner categorycode ou category_type permet d\'afficher la liste des catégories ou des types de catégories à l\'ajout d\'un lecteur');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributes','0','Use extended patron IDs and attributes',NULL,'YesNo');
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
+-- Table structure for table `borrower_attribute_types`
+--
+
+DROP TABLE IF EXISTS `borrower_attribute_types`;
+CREATE TABLE `borrower_attribute_types` (
+ `code` varchar(10) NOT NULL,
+ `description` varchar(255) NOT NULL,
+ `repeatable` tinyint(1) NOT NULL default 0,
+ `unique_id` tinyint(1) NOT NULL default 0,
+ `opac_display` tinyint(1) NOT NULL default 0,
+ `password_allowed` tinyint(1) NOT NULL default 0,
+ `staff_searchable` tinyint(1) NOT NULL default 0,
+ `authorised_value_category` varchar(10) default NULL,
+ PRIMARY KEY (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `borrower_attributes`
+--
+
+DROP TABLE IF EXISTS `borrower_attributes`;
+CREATE TABLE `borrower_attributes` (
+ `borrowernumber` int(11) NOT NULL,
+ `code` varchar(10) NOT NULL,
+ `attribute` varchar(30) default NULL,
+ `password` varchar(30) default NULL,
+ KEY `borrowernumber` (`borrowernumber`),
+ KEY `code_attribute` (`code`, `attribute`),
+ CONSTRAINT `borrower_attributes_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
+ ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`)
+ ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
-- Table structure for table `branchcategories`
--
SetVersion ($DBversion);
}
+
+
+$DBversion = "3.00.00.081";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("CREATE TABLE `borrower_attribute_types` (
+ `code` varchar(10) NOT NULL,
+ `description` varchar(255) NOT NULL,
+ `repeatable` tinyint(1) NOT NULL default 0,
+ `unique_id` tinyint(1) NOT NULL default 0,
+ `opac_display` tinyint(1) NOT NULL default 0,
+ `password_allowed` tinyint(1) NOT NULL default 0,
+ `staff_searchable` tinyint(1) NOT NULL default 0,
+ `authorised_value_category` varchar(10) default NULL,
+ PRIMARY KEY (`code`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8");
+ $dbh->do("CREATE TABLE `borrower_attributes` (
+ `borrowernumber` int(11) NOT NULL,
+ `code` varchar(10) NOT NULL,
+ `attribute` varchar(30) default NULL,
+ `password` varchar(30) default NULL,
+ KEY `borrowernumber` (`borrowernumber`),
+ KEY `code_attribute` (`code`, `attribute`),
+ CONSTRAINT `borrower_attributes_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
+ ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`)
+ ON DELETE CASCADE ON UPDATE CASCADE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8");
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributes','0','Use extended patron IDs and attributes',NULL,'YesNo')");
+ print "Upgrade to $DBversion done (added borrower_attributes and borrower_attribute_types)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
use strict;
sub kohaversion {
- our $VERSION = "3.00.00.080";
+ our $VERSION = "3.00.00.081";
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install