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

(-)a/installer/data/mysql/atomicupdate/bug_18173.perl (+13 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    if ( column_exists( 'issues', 'return' ) ) {
4
        $dbh->do(q|ALTER TABLE issues DROP column `return`|);
5
    }
6
7
    if ( column_exists( 'old_issues', 'return' ) ) {
8
        $dbh->do(q|ALTER TABLE old_issues DROP column `return`|);
9
    }
10
11
    SetVersion( $DBversion );
12
    print "Upgrade to $DBversion done (Bug 18173 - Remove issues.return DB field)\n";
13
}
(-)a/installer/data/mysql/kohastructure.sql (-3 lines)
Lines 1741-1747 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1741
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1741
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1742
  `returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues
1742
  `returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues
1743
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1743
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1744
  `return` varchar(4) default NULL,
1745
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1744
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1746
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1745
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1747
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1746
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
Lines 1770-1776 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1770
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1769
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1771
  `returndate` datetime default NULL, -- date the item was returned
1770
  `returndate` datetime default NULL, -- date the item was returned
1772
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1771
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1773
  `return` varchar(4) default NULL,
1774
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1772
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1775
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1773
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1776
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1774
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1777
- 

Return to bug 18173