SetVersion ($DBversion);
}
+$DBversion = "3.09.00.018";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("DROP TABLE IF EXISTS aqbudgetborrowers");
+ $dbh->do("
+ CREATE TABLE aqbudgetborrowers (
+ budget_id int(11) NOT NULL,
+ borrowernumber int(11) NOT NULL,
+ PRIMARY KEY (budget_id, borrowernumber),
+ CONSTRAINT aqbudgetborrowers_ibfk_1 FOREIGN KEY (budget_id)
+ REFERENCES aqbudgets (budget_id)
+ ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT aqbudgetborrowers_ibfk_2 FOREIGN KEY (borrowernumber)
+ REFERENCES borrowers (borrowernumber)
+ ON DELETE CASCADE ON UPDATE CASCADE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ ");
+ $dbh->do("
+ INSERT INTO permissions (module_bit, code, description)
+ VALUES (11, 'budget_manage_all', 'Manage all budgets')
+ ");
+ print "Upgrade to $DBversion done (Add aqbudgetborrowers table)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.019";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACShowUnusedAuthorities','1','','Show authorities that are not being used in the OPAC.','YesNo')");
+ print "Upgrade to $DBversion done (Add OPACShowUnusedAuthorities system preference)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.09.00.020";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo')");
+ $dbh->do("
+CREATE TABLE IF NOT EXISTS borrower_files (
+ file_id int(11) NOT NULL AUTO_INCREMENT,
+ borrowernumber int(11) NOT NULL,
+ file_name varchar(255) NOT NULL,
+ file_type varchar(255) NOT NULL,
+ file_description varchar(255) DEFAULT NULL,
+ file_content longblob NOT NULL,
+ date_uploaded timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (file_id),
+ KEY borrowernumber (borrowernumber)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ ");
+ $dbh->do("ALTER TABLE borrower_files ADD CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE");
+
+ print "Upgrade to $DBversion done (Added borrow_files table, EnableBorrowerFiles syspref)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.021";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');");
+ print "Upgrade to $DBversion done (Add syspref UpdateTotalIssuesOnCirc)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.022";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE search_history MODIFY COLUMN query_cgi text NOT NULL");
+ print "Upgrade to $DBversion done (Change search_history.query_cgi type to text. bug 5981)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.023";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES('SearchEngine','Zebra','Solr|Zebra','Search Engine','Choice')");
+ print "Upgrade to $DBversion done (Add system preference SearchEngine )\n";
+ SetVersion($DBversion);
+}
+
+$DBversion ="3.09.00.024";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free')");
+ print "Upgrade to $DBversion done (Add system preference IntranetSlipPrinterJS))\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.025";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do('START TRANSACTION');
+ $dbh->do('CREATE TABLE tmp_reserves AS SELECT * FROM old_reserves LIMIT 0');
+ $dbh->do('ALTER TABLE tmp_reserves ADD reserve_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST');
+ $dbh->do("
+ INSERT INTO tmp_reserves (
+ borrowernumber, reservedate, biblionumber,
+ constrainttype, branchcode, notificationdate,
+ reminderdate, cancellationdate, reservenotes,
+ priority, found, timestamp, itemnumber,
+ waitingdate, expirationdate, lowestPriority
+ ) SELECT
+ borrowernumber, reservedate, biblionumber,
+ constrainttype, branchcode, notificationdate,
+ reminderdate, cancellationdate, reservenotes,
+ priority, found, timestamp, itemnumber,
+ waitingdate, expirationdate, lowestPriority
+ FROM old_reserves ORDER BY reservedate
+ ");
+ $dbh->do('SET @ai = ( SELECT MAX( reserve_id ) FROM tmp_reserves )');
+ $dbh->do('TRUNCATE old_reserves');
+ $dbh->do('ALTER TABLE old_reserves ADD reserve_id INT( 11 ) NOT NULL PRIMARY KEY FIRST');
+ $dbh->do('INSERT INTO old_reserves SELECT * FROM tmp_reserves WHERE reserve_id <= @ai');
+ $dbh->do("
+ INSERT INTO tmp_reserves (
+ borrowernumber, reservedate, biblionumber,
+ constrainttype, branchcode, notificationdate,
+ reminderdate, cancellationdate, reservenotes,
+ priority, found, timestamp, itemnumber,
+ waitingdate, expirationdate, lowestPriority
+ ) SELECT
+ borrowernumber, reservedate, biblionumber,
+ constrainttype, branchcode, notificationdate,
+ reminderdate, cancellationdate, reservenotes,
+ priority, found, timestamp, itemnumber,
+ waitingdate, expirationdate, lowestPriority
+ FROM reserves ORDER BY reservedate
+ ");
+ $dbh->do('TRUNCATE reserves');
+ $dbh->do('ALTER TABLE reserves ADD reserve_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST');
+ $dbh->do('INSERT INTO reserves SELECT * FROM tmp_reserves WHERE reserve_id > @ai');
+ $dbh->do('DROP TABLE tmp_reserves');
+ $dbh->do('COMMIT');
+
+ my $sth = $dbh->prepare("
+ SELECT COUNT( * ) AS count
+ FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME = 'reserve_id'
+ AND (
+ TABLE_NAME LIKE 'reserves'
+ OR
+ TABLE_NAME LIKE 'old_reserves'
+ )
+ ");
+ $sth->execute();
+ my $row = $sth->fetchrow_hashref();
+ die("Failed to add reserve_id to reserves tables, please refresh the page to try again.") unless ( $row->{'count'} );
+
+ print "Upgrade to $DBversion done (add reserve_id to reserves & old_reserves tables)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.026";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES
+ ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
+ ( 3, 'manage_circ_rules', 'manage circulation rules')");
+ $dbh->do("INSERT INTO user_permissions (borrowernumber, module_bit, code)
+ SELECT borrowernumber, 3, 'parameters_remaining_permissions'
+ FROM borrowers WHERE flags & (1 << 3)");
+ # Give new subpermissions to all users that have 'parameters' permission flag (bit 3) set
+ # see userflags table
+ $dbh->do("INSERT INTO user_permissions (borrowernumber, module_bit, code)
+ SELECT borrowernumber, 3, 'manage_circ_rules'
+ FROM borrowers WHERE flags & (1 << 3)");
+ print "Upgrade to $DBversion done (Added parameters subpermissions)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = '3.09.00.027';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE issuingrules ADD overduefinescap decimal DEFAULT NULL");
+ my $maxfine = C4::Context->preference('MaxFine');
+ if ($maxfine && $maxfine < 900) { # an arbitrary value that tells us it's not "some huge value"
+ $dbh->do("UPDATE issuingrules SET overduefinescap=?",undef,$maxfine);
+ $dbh->do("UPDATE systempreferences SET value = NULL WHERE variable = 'MaxFine'");
+ }
+ $dbh->do("UPDATE systempreferences SET explanation = 'Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.' WHERE variable = 'MaxFine'");
+ print "Upgrade to $DBversion done (Bug 7420 add overduefinescap to circulation matrix)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.09.00.028";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ unless ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
+ my %referencetypes = ( '00' => 'PERSO_NAME',
+ '10' => 'CORPO_NAME',
+ '11' => 'MEETI_NAME',
+ '30' => 'UNIF_TITLE',
+ '48' => 'CHRON_TERM',
+ '50' => 'TOPIC_TERM',
+ '51' => 'GEOGR_NAME',
+ '55' => 'GENRE/FORM'
+ );
+ my $query = q{SELECT DISTINCT authtypecode, tagfield
+ FROM auth_subfield_structure
+ WHERE (tagfield BETWEEN '400' AND '455' OR
+ tagfield BETWEEN '500' and '555') AND tagsubfield='a' AND
+ frameworkcode = '' AND ROW(authtypecode, tagfield) NOT IN
+ (SELECT authtypecode, tagfield FROM auth_subfield_structure
+ WHERE tagsubfield ='9' )};
+ $sth = $dbh->prepare($query);
+ $sth->execute;
+ my $sth2 = $dbh->prepare(q{INSERT INTO auth_subfield_structure
+ (authtypecode, tagfield, tagsubfield, liblibrarian, libopac,
+ repeatable, mandatory, tab, authorised_value, value_builder,
+ seealso, isurl, hidden, linkid, kohafield, frameworkcode)
+ VALUES (?, ?, '9', '9 (RLIN)', '9 (RLIN)', 0, 0, ?, NULL, NULL,
+ NULL, 0, 1, '', '', '')});
+ my $sth3 = $dbh->prepare(q{UPDATE auth_subfield_structure SET
+ frameworkcode = ? WHERE authtypecode = ? AND
+ tagfield = ? AND tagsubfield = 'a'});
+ while (my $row = $sth->fetchrow_arrayref()) {
+ my ($authtypecode, $field) = @$row;
+ $sth2->execute($authtypecode, $field, substr($field, 0, 1));
+ my $authtypemarker = substr $field, 1, 2;
+ if ($authtypemarker && $referencetypes{$authtypemarker}) {
+ $sth3->execute($referencetypes{$authtypemarker}, $authtypecode, $field);
+ }
+ }
+ }
+
+ print "Upgrade to $DBversion done (Add thesaurus links for MARC21/NORMARC)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.029"; # FIXME
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("UPDATE systempreferences SET options=concat(options,'|EAN13') WHERE variable='itemBarcodeInputFilter' AND options NOT LIKE '%EAN13%'");
+ print "Upgrade to $DBversion done (Add itemBarcodeInputFilter choice EAN13)\n";
+
+ $dbh->do("UPDATE systempreferences SET options = concat(options,'|EAN13'), explanation = concat(explanation,'; EAN13 - incremental') WHERE variable = 'autoBarcode' AND options NOT LIKE '%EAN13%'");
+ print "Upgrade to $DBversion done ( Added EAN13 barcode autogeneration sequence )\n";
+
+ SetVersion($DBversion);
+}
+
+$DBversion ="3.09.00.030";
+if(C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ my $query = "SELECT value FROM systempreferences WHERE variable='opacstylesheet'";
+ my $remote= $dbh->selectrow_arrayref($query);
+ $dbh->do("DELETE from systempreferences WHERE variable='opacstylesheet'");
+ if($remote && $remote->[0]) {
+ $query="UPDATE systempreferences SET value=? WHERE variable='opaclayoutstylesheet'";
+ $dbh->do($query,undef,$remote->[0]);
+ print "NOTE: The URL of your remote opac css file has been moved to preference opaclayoutstylesheet.\n";
+ }
+ print "Upgrade to $DBversion done (BZ 8263: Make OPAC stylesheet preferences more consistent)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.031";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("DELETE FROM systempreferences WHERE variable='AmazonReviews'");
+ $dbh->do("DELETE FROM systempreferences WHERE variable='AmazonSimilarItems'");
+ $dbh->do("DELETE FROM systempreferences WHERE variable='AWSAccessKeyID'");
+ $dbh->do("DELETE FROM systempreferences WHERE variable='AWSPrivateKey'");
+ $dbh->do("DELETE FROM systempreferences WHERE variable='OPACAmazonReviews'");
+ $dbh->do("DELETE FROM systempreferences WHERE variable='OPACAmazonSimilarItems'");
+ $dbh->do("DELETE FROM systempreferences WHERE variable='AmazonEnabled'");
+ $dbh->do("DELETE FROM systempreferences WHERE variable='OPACAmazonEnabled'");
+ print "Upgrade to $DBversion done ('Remove preferences controlling broken Amazon features (Bug 8679')\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.09.00.032";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("UPDATE systempreferences SET value = 'call_number' WHERE variable = 'defaultSortField' AND value = 'callnumber'");
+ $dbh->do("UPDATE systempreferences SET value = 'call_number' WHERE variable = 'OPACdefaultSortField' AND value = 'callnumber'");
+ print "Upgrade to $DBversion done (Bug 8657 - Default sort by call number does not work. Correcting system preference value.)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = '3.09.00.033';
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacSuppressionByIPRange','','Restrict the suppression to IP adresses outside of the IP range','','free');");
+ print "Upgrade to $DBversion done (Add OpacSuppressionByIPRange syspref)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion ="3.09.00.034";
+if(C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("UPDATE auth_subfield_structure SET frameworkcode = 'PERSO_NAME' WHERE frameworkcode = 'PERSO_CODE'");
+ $dbh->do("UPDATE auth_subfield_structure SET frameworkcode = 'CORPO_NAME' WHERE frameworkcode = 'ORGO_CODE'");
+ print "Upgrade to $DBversion done (Bug 8207: correct typo in authority types)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.09.00.035";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("
+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PrefillItem','0','When a new item is added, should it be prefilled with last created item values?','','YesNo');
+ ");
+ $dbh->do(
+ "INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToUseWhenPrefill','','Define a list of subfields to use when prefilling items (separated by space)','','Free');
+ ");
+ print "Upgrade to $DBversion done (Adding PrefillItem and SubfieldsToUseWhenPrefill sysprefs)\n";
+}
+
+$DBversion = "3.09.00.036";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ # biblioitems changes
+ $dbh->do("ALTER TABLE biblioitems ADD COLUMN agerestriction VARCHAR(255) DEFAULT NULL AFTER cn_sort");
+ $dbh->do("ALTER TABLE deletedbiblioitems ADD COLUMN agerestriction VARCHAR(255) DEFAULT NULL AFTER cn_sort");
+ # preferences changes
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionMarker','','Markers for age restriction indication, e.g. FSK|PEGI|Age|. See: http://wiki.koha-community.org/wiki/Age_restriction',NULL,'free')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionOverride',0,'Allow staff to check out an item with age restriction.',NULL,'YesNo')");
+
+ print "Upgrade to $DBversion done (Add colum agerestriction to biblioitems and deletedbiblioitems, add system preferences AgeRestrictionMarker and AgeRestrictionOverride)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.037";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseTransportCostMatrix',0,'Use Transport Cost Matrix when filling holds','','YesNo')");
+
+ $dbh->do("CREATE TABLE `transport_cost` (
+ `frombranch` varchar(10) NOT NULL,
+ `tobranch` varchar(10) NOT NULL,
+ `cost` decimal(6,2) NOT NULL,
+ `disable_transfer` tinyint(1) NOT NULL DEFAULT 0,
+ CHECK ( `frombranch` <> `tobranch` ), -- a dud check, mysql does not support that
+ PRIMARY KEY (`frombranch`, `tobranch`),
+ CONSTRAINT `transport_cost_ibfk_1` FOREIGN KEY (`frombranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `transport_cost_ibfk_2` FOREIGN KEY (`tobranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8");
+
+ print "Upgrade to $DBversion done (creating `transport_cost` table; adding UseTransportCostMatrix systempref, in circulation)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion ="3.09.00.038";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("ALTER TABLE borrower_attributes CHANGE attribute attribute VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
+ print "Upgrade to $DBversion done (Increase the maximum size of a borrower attribute value)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion ="3.09.00.039";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES('DidYouMeanFromAuthorities','0','Suggest searches based on authority file.','YesNo');");
+ print "Upgrade to $DBversion done (Add system preference DidYouMeanFromAuthorities)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.040";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo');");
+ print "Upgrade to $DBversion done (Add IncludeSeeFromInSearches system preference)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.09.00.041";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do(qq{
+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('ExportRemoveFields','','List of fields for non export in circulation.pl (separated by a space)','','');
+ });
+ print "Upgrade to $DBversion done (Add system preference ExportRemoveFields)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.042";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do(qq{
+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('ExportWithCsvProfile','','Set a profile name for CSV export','','');
+ });
+ print "Upgrade to $DBversion done (Adds New System preference ExportWithCsvProfile)\n";
+ SetVersion($DBversion)
+}
+
+$DBversion = "3.09.00.043";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("
+ ALTER TABLE aqorders
+ ADD parent_ordernumber int(11) DEFAULT NULL
+ ");
+ $dbh->do("
+ UPDATE aqorders
+ SET parent_ordernumber = ordernumber;
+ ");
+ print "Upgrade to $DBversion done (Adding parent_ordernumber in aqorders)\n";
+ SetVersion($DBversion);
+}
+
+
+$DBversion = '3.09.00.044';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE statistics ADD COLUMN ccode VARCHAR ( 10 ) NULL AFTER associatedborrower");
+ $dbh->do("UPDATE statistics SET statistics.ccode = ( SELECT items.ccode FROM items WHERE statistics.itemnumber = items.itemnumber )");
+ $dbh->do("UPDATE statistics SET statistics.ccode = (
+ SELECT deleteditems.ccode FROM deleteditems
+ WHERE statistics.itemnumber = deleteditems.itemnumber
+ ) WHERE statistics.ccode IS NULL");
+ print "Upgrade done ( Added Collection Code to Statistics table. )\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.09.00.045";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("ALTER TABLE borrower_attribute_types MODIFY category_code VARCHAR( 10 ) NULL DEFAULT NULL");
+ print "Upgrade to $DBversion done. (Bug 8002: Update patron attribute types table from varchar(1) to varchar(10) category_code)\nWarning to Koha System Administrators: If you use borrower attributes defined by borrower categories, you have to check your configuration. A bug may have removed your attribute links to borrower categories.\nPlease check, and fix it if necessary.";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.046";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("ALTER TABLE `accountlines` ADD `accountlines_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;");
+ print "Upgrade to $DBversion done (adding accountlines_id field in accountlines table)\n";
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
=head2 TableExists($table)
Drop all foreign keys of the table $table
=cut
-
-
sub DropAllForeignKeys {
my ($table) = @_;
# get the table description
C4::Context::clear_syspref_cache(); # invalidate cached preferences
}
exit;
-