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

(-)a/installer/data/mysql/updatedatabase.pl (-13 / +12 lines)
Lines 151-157 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
151
151
152
$DBversion = "3.00.00.006";
152
$DBversion = "3.00.00.006";
153
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
153
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
154
    sanitize_zeo_date('issues', 'issuedate');
154
    sanitize_zero_date('issues', 'issuedate');
155
    print "Upgrade to $DBversion done (filled issues.issuedate with timestamp)\n";
155
    print "Upgrade to $DBversion done (filled issues.issuedate with timestamp)\n";
156
    SetVersion ($DBversion);
156
    SetVersion ($DBversion);
157
}
157
}
Lines 1950-1956 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
1950
    print "Upgrade to $DBversion done (remove default '0000-00-00' in subscriptionhistory.enddate field)\n";
1950
    print "Upgrade to $DBversion done (remove default '0000-00-00' in subscriptionhistory.enddate field)\n";
1951
    $dbh->do("ALTER TABLE `subscriptionhistory` CHANGE `enddate` `enddate` DATE NULL DEFAULT NULL ");
1951
    $dbh->do("ALTER TABLE `subscriptionhistory` CHANGE `enddate` `enddate` DATE NULL DEFAULT NULL ");
1952
1952
1953
    sanitize_zeo_date('subscriptionhistory', 'enddate');
1953
    sanitize_zero_date('subscriptionhistory', 'enddate');
1954
1954
1955
    SetVersion ($DBversion);
1955
    SetVersion ($DBversion);
1956
}
1956
}
Lines 2905-2911 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
2905
    # match the new type of the corresponding field
2905
    # match the new type of the corresponding field
2906
    $dbh->do('ALTER TABLE fundmapping modify column bookfundid varchar(30)');
2906
    $dbh->do('ALTER TABLE fundmapping modify column bookfundid varchar(30)');
2907
    # System did not ensure budgetdate was valid historically
2907
    # System did not ensure budgetdate was valid historically
2908
    sanitize_zeo_date('fundmapping', 'budgetdate');
2908
    sanitize_zero_date('fundmapping', 'budgetdate');
2909
    $dbh->do(q|UPDATE fundmapping SET budgetdate = entrydate WHERE budgetdate IS NULL|);
2909
    $dbh->do(q|UPDATE fundmapping SET budgetdate = entrydate WHERE budgetdate IS NULL|);
2910
    # We save the map in fundmapping in case you need later processing
2910
    # We save the map in fundmapping in case you need later processing
2911
    $dbh->do(q|ALTER TABLE fundmapping add column aqbudgetid integer|);
2911
    $dbh->do(q|ALTER TABLE fundmapping add column aqbudgetid integer|);
Lines 7607-7613 if ( CheckVersion($DBversion) ) { Link Here
7607
        WHERE subscriptionid = ?
7607
        WHERE subscriptionid = ?
7608
    |);
7608
    |);
7609
7609
7610
    sanitize_zeo_date('subscription', 'firstacquidate');
7610
    sanitize_zero_date('subscription', 'firstacquidate');
7611
    my $get_subscriptions_sth = $dbh->prepare(qq|
7611
    my $get_subscriptions_sth = $dbh->prepare(qq|
7612
        SELECT subscriptionid, startdate
7612
        SELECT subscriptionid, startdate
7613
        FROM subscription
7613
        FROM subscription
Lines 10641-10647 if ( CheckVersion($DBversion) ) { Link Here
10641
$DBversion = "3.21.00.009";
10641
$DBversion = "3.21.00.009";
10642
if ( CheckVersion($DBversion) ) {
10642
if ( CheckVersion($DBversion) ) {
10643
10643
10644
    sanitize_zeo_date('aqorders', 'datecancellationprinted');
10644
    sanitize_zero_date('aqorders', 'datecancellationprinted');
10645
10645
10646
    $dbh->do(q|
10646
    $dbh->do(q|
10647
        UPDATE aqorders SET orderstatus='cancelled'
10647
        UPDATE aqorders SET orderstatus='cancelled'
Lines 10879-10888 if ( CheckVersion($DBversion) ) { Link Here
10879
$DBversion = "3.21.00.023";
10879
$DBversion = "3.21.00.023";
10880
if ( CheckVersion($DBversion) ) {
10880
if ( CheckVersion($DBversion) ) {
10881
10881
10882
    sanitize_zeo_date('borrowers', 'debarred');
10882
    sanitize_zero_date('borrowers', 'debarred');
10883
    sanitize_zeo_date('borrowers', 'dateexpiry');
10883
    sanitize_zero_date('borrowers', 'dateexpiry');
10884
    sanitize_zeo_date('borrowers', 'dateofbirth');
10884
    sanitize_zero_date('borrowers', 'dateofbirth');
10885
    sanitize_zeo_date('borrowers', 'dateenrolled');
10885
    sanitize_zero_date('borrowers', 'dateenrolled');
10886
10886
10887
    print "Upgrade to $DBversion done (Bug 14717: Prevent 0000-00-00 dates in patron data)\n";
10887
    print "Upgrade to $DBversion done (Bug 14717: Prevent 0000-00-00 dates in patron data)\n";
10888
    SetVersion($DBversion);
10888
    SetVersion($DBversion);
Lines 21692-21700 $DBversion = '19.12.00.076'; Link Here
21692
if( CheckVersion( $DBversion ) ) {
21692
if( CheckVersion( $DBversion ) ) {
21693
    my @warnings;
21693
    my @warnings;
21694
21694
21695
    sanitize_zeo_date('serial', 'planneddate');
21695
    sanitize_zero_date('serial', 'planneddate');
21696
    sanitize_zeo_date('serial', 'publisheddate');
21696
    sanitize_zero_date('serial', 'publisheddate');
21697
    sanitize_zeo_date('serial', 'claimdate');
21697
    sanitize_zero_date('serial', 'claimdate');
21698
21698
21699
    $dbh->do(q|
21699
    $dbh->do(q|
21700
        ALTER TABLE serial
21700
        ALTER TABLE serial
21701
- 

Return to bug 26997