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

(-)a/installer/data/mysql/kohastructure.sql (-8 / +8 lines)
Lines 938-952 DROP TABLE IF EXISTS `issues`; Link Here
938
CREATE TABLE `issues` (
938
CREATE TABLE `issues` (
939
  `borrowernumber` int(11) default NULL,
939
  `borrowernumber` int(11) default NULL,
940
  `itemnumber` int(11) default NULL,
940
  `itemnumber` int(11) default NULL,
941
  `date_due` date default NULL,
941
  `date_due` datetime default NULL,
942
  `branchcode` varchar(10) default NULL,
942
  `branchcode` varchar(10) default NULL,
943
  `issuingbranch` varchar(18) default NULL,
943
  `issuingbranch` varchar(18) default NULL,
944
  `returndate` date default NULL,
944
  `returndate` datetime default NULL,
945
  `lastreneweddate` date default NULL,
945
  `lastreneweddate` datetime default NULL,
946
  `return` varchar(4) default NULL,
946
  `return` varchar(4) default NULL,
947
  `renewals` tinyint(4) default NULL,
947
  `renewals` tinyint(4) default NULL,
948
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
948
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
949
  `issuedate` date default NULL,
949
  `issuedate` datetime default NULL,
950
  KEY `issuesborridx` (`borrowernumber`),
950
  KEY `issuesborridx` (`borrowernumber`),
951
  KEY `issuesitemidx` (`itemnumber`),
951
  KEY `issuesitemidx` (`itemnumber`),
952
  KEY `bordate` (`borrowernumber`,`timestamp`),
952
  KEY `bordate` (`borrowernumber`,`timestamp`),
Lines 1339-1353 DROP TABLE IF EXISTS `old_issues`; Link Here
1339
CREATE TABLE `old_issues` (
1339
CREATE TABLE `old_issues` (
1340
  `borrowernumber` int(11) default NULL,
1340
  `borrowernumber` int(11) default NULL,
1341
  `itemnumber` int(11) default NULL,
1341
  `itemnumber` int(11) default NULL,
1342
  `date_due` date default NULL,
1342
  `date_due` datetime default NULL,
1343
  `branchcode` varchar(10) default NULL,
1343
  `branchcode` varchar(10) default NULL,
1344
  `issuingbranch` varchar(18) default NULL,
1344
  `issuingbranch` varchar(18) default NULL,
1345
  `returndate` date default NULL,
1345
  `returndate` datetime default NULL,
1346
  `lastreneweddate` date default NULL,
1346
  `lastreneweddate` datetime default NULL,
1347
  `return` varchar(4) default NULL,
1347
  `return` varchar(4) default NULL,
1348
  `renewals` tinyint(4) default NULL,
1348
  `renewals` tinyint(4) default NULL,
1349
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
1349
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
1350
  `issuedate` date default NULL,
1350
  `issuedate` datetime default NULL,
1351
  KEY `old_issuesborridx` (`borrowernumber`),
1351
  KEY `old_issuesborridx` (`borrowernumber`),
1352
  KEY `old_issuesitemidx` (`itemnumber`),
1352
  KEY `old_issuesitemidx` (`itemnumber`),
1353
  KEY `old_bordate` (`borrowernumber`,`timestamp`),
1353
  KEY `old_bordate` (`borrowernumber`,`timestamp`),
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +16 lines)
Lines 4332-4337 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4332
    SetVersion($DBversion);
4332
    SetVersion($DBversion);
4333
}
4333
}
4334
4334
4335
$DBversion = "3.05.00.XXX";
4336
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
4337
    $dbh->do("ALTER TABLE issues CHANGE date_due date_due datetime");
4338
    $dbh->do("ALTER TABLE issues CHANGE returndate returndate datetime");
4339
    $dbh->do("ALTER TABLE issues CHANGE lastreneweddate lastreneweddate datetime");
4340
    $dbh->do("ALTER TABLE issues CHANGE issuedate issuedate datetime");
4341
    $dbh->do("ALTER TABLE old_issues CHANGE date_due date_due datetime");
4342
    $dbh->do("ALTER TABLE old_issues CHANGE returndate returndate datetime");
4343
    $dbh->do("ALTER TABLE old_issues CHANGE lastreneweddate lastreneweddate datetime");
4344
    $dbh->do("ALTER TABLE old_issues CHANGE issuedate issuedate datetime");
4345
    print "Upgrade to $DBversion done (Setting up issues tables for hourly loans)\n";
4346
    SetVersion($DBversion);
4347
}
4348
4349
4350
4335
=head1 FUNCTIONS
4351
=head1 FUNCTIONS
4336
4352
4337
=head2 DropAllForeignKeys($table)
4353
=head2 DropAllForeignKeys($table)
4338
- 

Return to bug 6430