--- /dev/null
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+ if ( column_exists( 'issues', 'return' ) ) {
+ $dbh->do(q|ALTER TABLE issues DROP column `return`|);
+ }
+
+ if ( column_exists( 'old_issues', 'return' ) ) {
+ $dbh->do(q|ALTER TABLE old_issues DROP column `return`|);
+ }
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 18173 - Remove issues.return DB field)\n";
+}
`branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
`returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues
`lastreneweddate` datetime default NULL, -- date the item was last renewed
- `return` varchar(4) default NULL,
`renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
`auto_renew` BOOLEAN default FALSE, -- automatic renewal
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
`branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
`returndate` datetime default NULL, -- date the item was returned
`lastreneweddate` datetime default NULL, -- date the item was last renewed
- `return` varchar(4) default NULL,
`renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
`auto_renew` BOOLEAN default FALSE, -- automatic renewal
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched