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
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
636
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
636
  KEY borrowernumber (borrowernumber),
637
  KEY borrowernumber (borrowernumber),
637
  KEY `cardnumber` (`cardnumber`),
638
  KEY `cardnumber` (`cardnumber`),
Lines 1664-1669 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1664
  `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'.
1665
  `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'.
1665
  `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)
1666
  `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)
1666
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1667
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1668
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
1667
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
1669
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
1668
  UNIQUE KEY `cardnumber` (`cardnumber`),
1670
  UNIQUE KEY `cardnumber` (`cardnumber`),
1669
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1671
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
Lines 2539-2544 CREATE TABLE `letter` ( -- table for all notice templates in Koha Link Here
2539
  `title` varchar(200) NOT NULL default '', -- subject line of the notice
2541
  `title` varchar(200) NOT NULL default '', -- subject line of the notice
2540
  `content` text, -- body text for the notice or slip
2542
  `content` text, -- body text for the notice or slip
2541
  `message_transport_type` varchar(20) NOT NULL DEFAULT 'email', -- transport type for this notice
2543
  `message_transport_type` varchar(20) NOT NULL DEFAULT 'email', -- transport type for this notice
2544
  `lang` varchar(25) NOT NULL DEFAULT 'default', -- lang of the notice
2542
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
2545
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
2543
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2546
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2544
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2547
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2545
- 

Return to bug 17762