View | Details | Raw Unified | Return to bug 17762
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_xxxxx.perl (+15 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
4
    if( !column_exists( 'letter', 'lang' ) ) {
5
        $dbh->do( "ALTER TABLE letter ADD COLUMN lang VARCHAR(25) NOT NULL DEFAULT 'default' AFTER message_transport_type" );
6
    }
7
8
    if( !column_exists( 'borrowers', 'lang' ) ) {
9
        $dbh->do( "ALTER TABLE borrowers ADD COLUMN lang VARCHAR(25) NOT NULL DEFAULT 'default' AFTER lastseen" );
10
        $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN lang VARCHAR(25) NOT NULL DEFAULT 'default' AFTER lastseen" );
11
    }
12
13
    SetVersion( $DBversion );
14
    print "Upgrade to $DBversion done (Bug XXXXX - Add columns letter.lang and borrowers.lang to allow translation of notices)\n";
15
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 630-635 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
630
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
630
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
631
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
631
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
632
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
632
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
633
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
633
  KEY borrowernumber (borrowernumber),
634
  KEY borrowernumber (borrowernumber),
634
  KEY `cardnumber` (`cardnumber`),
635
  KEY `cardnumber` (`cardnumber`),
635
  KEY `sms_provider_id` (`sms_provider_id`)
636
  KEY `sms_provider_id` (`sms_provider_id`)
Lines 1655-1660 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1655
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
1656
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
1656
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
1657
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
1657
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1658
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1659
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
1658
  UNIQUE KEY `cardnumber` (`cardnumber`),
1660
  UNIQUE KEY `cardnumber` (`cardnumber`),
1659
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1661
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1660
  KEY `categorycode` (`categorycode`),
1662
  KEY `categorycode` (`categorycode`),
Lines 2527-2532 CREATE TABLE `letter` ( -- table for all notice templates in Koha Link Here
2527
  `title` varchar(200) NOT NULL default '', -- subject line of the notice
2529
  `title` varchar(200) NOT NULL default '', -- subject line of the notice
2528
  `content` text, -- body text for the notice or slip
2530
  `content` text, -- body text for the notice or slip
2529
  `message_transport_type` varchar(20) NOT NULL DEFAULT 'email', -- transport type for this notice
2531
  `message_transport_type` varchar(20) NOT NULL DEFAULT 'email', -- transport type for this notice
2532
  `lang` varchar(25) NOT NULL DEFAULT 'default', -- lang of the notice
2530
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
2533
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
2531
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2534
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2532
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2535
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2533
- 

Return to bug 17762