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 632-637 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
632
  `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'.
632
  `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'.
633
  `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)
633
  `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)
634
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
634
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
635
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
635
  KEY borrowernumber (borrowernumber),
636
  KEY borrowernumber (borrowernumber),
636
  KEY `cardnumber` (`cardnumber`),
637
  KEY `cardnumber` (`cardnumber`),
637
  KEY `sms_provider_id` (`sms_provider_id`)
638
  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 2526-2531 CREATE TABLE `letter` ( -- table for all notice templates in Koha Link Here
2526
  `title` varchar(200) NOT NULL default '', -- subject line of the notice
2528
  `title` varchar(200) NOT NULL default '', -- subject line of the notice
2527
  `content` text, -- body text for the notice or slip
2529
  `content` text, -- body text for the notice or slip
2528
  `message_transport_type` varchar(20) NOT NULL DEFAULT 'email', -- transport type for this notice
2530
  `message_transport_type` varchar(20) NOT NULL DEFAULT 'email', -- transport type for this notice
2531
  `lang` varchar(25) NOT NULL DEFAULT 'default', -- lang of the notice
2529
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
2532
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
2530
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2533
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2531
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2534
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2532
- 

Return to bug 17762