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

(-)a/installer/data/mysql/atomicupdate/bug_22577.perl (+9 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "ALTER TABLE `borrowers` MODIFY COLUMN `branchcode` VARCHAR(10) DEFAULT NULL");
4
    $dbh->do( "ALTER TABLE `borrowers` MODIFY COLUMN `categorycode` VARCHAR(10) DEFAULT NULL");
5
    $dbh->do( "INSERT INTO `borrowers` (borrowernumber, surname, firstname, flags) VALUES ('-1', 'CRON', 'CRON', 0)" );
6
    
7
    SetVersion( $DBversion );
8
    print "Upgrade to $DBversion done (Bug 22577 - Add internal user for cron)\n";
9
}
(-)a/installer/data/mysql/kohastructure.sql (-3 / +2 lines)
Lines 1598-1605 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1598
  `B_email` MEDIUMTEXT, -- the patron/borrower's alternate email address
1598
  `B_email` MEDIUMTEXT, -- the patron/borrower's alternate email address
1599
  `B_phone` LONGTEXT, -- the patron/borrower's alternate phone number
1599
  `B_phone` LONGTEXT, -- the patron/borrower's alternate phone number
1600
  `dateofbirth` date default NULL, -- the patron/borrower's date of birth (YYYY-MM-DD)
1600
  `dateofbirth` date default NULL, -- the patron/borrower's date of birth (YYYY-MM-DD)
1601
  `branchcode` varchar(10) NOT NULL default '', -- foreign key from the branches table, includes the code of the patron/borrower's home branch
1601
  `branchcode` varchar(10) default NULL, -- foreign key from the branches table, includes the code of the patron/borrower's home branch
1602
  `categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table, includes the code of the patron category
1602
  `categorycode` varchar(10) default NULL, -- foreign key from the categories table, includes the code of the patron category
1603
  `dateenrolled` date default NULL, -- date the patron was added to Koha (YYYY-MM-DD)
1603
  `dateenrolled` date default NULL, -- date the patron was added to Koha (YYYY-MM-DD)
1604
  `dateexpiry` date default NULL, -- date the patron/borrower's card is set to expire (YYYY-MM-DD)
1604
  `dateexpiry` date default NULL, -- date the patron/borrower's card is set to expire (YYYY-MM-DD)
1605
  `date_renewed` date default NULL, -- date the patron/borrower's card was last renewed
1605
  `date_renewed` date default NULL, -- date the patron/borrower's card was last renewed
1606
- 

Return to bug 22577