From f3d0828c81dd67631a026919b36675683c8eac0f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 4 Feb 2009 14:19:51 -0600 Subject: [PATCH] reconciled DB revs: now at 013 --- installer/data/mysql/updatedatabase.pl | 76 +++++++++++++------------- kohaversion.pl | 2 +- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 31971d8faa..6b4d6ba3e6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2122,44 +2122,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (added subpermissions for circulate permission)\n"; } -$DBversion = '3.01.00.016'; -if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do(" - CREATE TABLE item_circulation_alert_preferences ( - id int(11) AUTO_INCREMENT, - branchcode varchar(10) NOT NULL, - categorycode varchar(10) NOT NULL, - item_type varchar(10) NOT NULL, - notification varchar(16) NOT NULL, - PRIMARY KEY (id), - KEY (branchcode, categorycode, item_type, notification) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - "); - - $dbh->do(q{ ALTER TABLE `message_queue` ADD metadata text DEFAULT NULL AFTER content; }); - $dbh->do(q{ ALTER TABLE `message_queue` ADD letter_code varchar(64) DEFAULT NULL AFTER metadata; }); - - $dbh->do(q{ - INSERT INTO `letter` (`module`, `code`, `name`, `title`, `content`) VALUES - ('circulation','CHECKIN','Item Check-in','Check-ins','The following items have been checked in:\r\n----\r\n<>\r\n----\r\nThank you.'); - }); - $dbh->do(q{ - INSERT INTO `letter` (`module`, `code`, `name`, `title`, `content`) VALUES - ('circulation','CHECKOUT','Item Checkout','Checkouts','The following items have been checked out:\r\n----\r\n<>\r\n----\r\nThank you for visiting <>.'); - }); - - $dbh->do(q{INSERT INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (5, 'Item Check-in', 0);}); - $dbh->do(q{INSERT INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (6, 'Item Checkout', 0);}); - - $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (5, 'email', 0, 'circulation', 'CHECKIN');}); - $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (5, 'sms', 0, 'circulation', 'CHECKIN');}); - $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (6, 'email', 0, 'circulation', 'CHECKOUT');}); - $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (6, 'sms', 0, 'circulation', 'CHECKOUT');}); - - print "Upgrade to $DBversion done (data for Email Checkout Slips project)\n"; - SetVersion ($DBversion); -} - $DBversion = '3.01.00.010'; if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) { $dbh->do("ALTER TABLE `borrower_attributes` MODIFY COLUMN `attribute` VARCHAR(64) DEFAULT NULL"); @@ -2221,6 +2183,44 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.013'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(" + CREATE TABLE item_circulation_alert_preferences ( + id int(11) AUTO_INCREMENT, + branchcode varchar(10) NOT NULL, + categorycode varchar(10) NOT NULL, + item_type varchar(10) NOT NULL, + notification varchar(16) NOT NULL, + PRIMARY KEY (id), + KEY (branchcode, categorycode, item_type, notification) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + "); + + $dbh->do(q{ ALTER TABLE `message_queue` ADD metadata text DEFAULT NULL AFTER content; }); + $dbh->do(q{ ALTER TABLE `message_queue` ADD letter_code varchar(64) DEFAULT NULL AFTER metadata; }); + + $dbh->do(q{ + INSERT INTO `letter` (`module`, `code`, `name`, `title`, `content`) VALUES + ('circulation','CHECKIN','Item Check-in','Check-ins','The following items have been checked in:\r\n----\r\n<>\r\n----\r\nThank you.'); + }); + $dbh->do(q{ + INSERT INTO `letter` (`module`, `code`, `name`, `title`, `content`) VALUES + ('circulation','CHECKOUT','Item Checkout','Checkouts','The following items have been checked out:\r\n----\r\n<>\r\n----\r\nThank you for visiting <>.'); + }); + + $dbh->do(q{INSERT INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (5, 'Item Check-in', 0);}); + $dbh->do(q{INSERT INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (6, 'Item Checkout', 0);}); + + $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (5, 'email', 0, 'circulation', 'CHECKIN');}); + $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (5, 'sms', 0, 'circulation', 'CHECKIN');}); + $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (6, 'email', 0, 'circulation', 'CHECKOUT');}); + $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (6, 'sms', 0, 'circulation', 'CHECKOUT');}); + + print "Upgrade to $DBversion done (data for Email Checkout Slips project)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index fc73c47b48..825b86d2d3 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.016'; + our $VERSION = '3.01.00.013'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5