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

(-)a/installer/data/mysql/updatedatabase.pl (-6 / +11 lines)
Lines 16129-16144 if( CheckVersion( $DBversion ) ) { Link Here
16129
16129
16130
$DBversion = '18.06.00.005';
16130
$DBversion = '18.06.00.005';
16131
if( CheckVersion( $DBversion ) ) {
16131
if( CheckVersion( $DBversion ) ) {
16132
    $dbh->do( "ALTER IGNORE TABLE aqorders ADD COLUMN created_by int(11) NULL DEFAULT NULL AFTER quantityreceived;" );
16132
    unless ( column_exists('aqorders', 'created') ) {
16133
    $dbh->do( "ALTER IGNORE TABLE aqorders ADD CONSTRAINT aqorders_created_by FOREIGN KEY (created_by) REFERENCES borrowers (borrowernumber) ON DELETE SET NULL ON UPDATE CASCADE;" );
16133
        $dbh->do( "ALTER TABLE aqorders ADD COLUMN created_by int(11) NULL DEFAULT NULL AFTER quantityreceived;" );
16134
    $dbh->do( "UPDATE aqorders, aqbasket SET aqorders.created_by = aqbasket.authorisedby  WHERE aqorders.basketno = aqbasket.basketno AND aqorders.created_by IS NULL;" );
16134
        unless ( foreign_key_exists('aqorders', 'aqorders_created_by') ) {
16135
            $dbh->do( "ALTER TABLE aqorders ADD CONSTRAINT aqorders_created_by FOREIGN KEY (created_by) REFERENCES borrowers (borrowernumber) ON DELETE SET NULL ON UPDATE CASCADE;" );
16136
        }
16137
        $dbh->do( "UPDATE aqorders, aqbasket SET aqorders.created_by = aqbasket.authorisedby  WHERE aqorders.basketno = aqbasket.basketno AND aqorders.created_by IS NULL;" );
16138
    }
16135
    SetVersion( $DBversion );
16139
    SetVersion( $DBversion );
16136
    print "Upgrade to $DBversion done (Bug 12395 - Save order line's creator)\n";
16140
    print "Upgrade to $DBversion done (Bug 12395 - Save order line's creator)\n";
16137
}
16141
}
16138
16142
16139
$DBversion = '18.06.00.006';
16143
$DBversion = '18.06.00.006';
16140
if( CheckVersion( $DBversion ) ) {
16144
if( CheckVersion( $DBversion ) ) {
16141
    $dbh->do( "ALTER IGNORE TABLE patron_lists ADD COLUMN shared tinyint(1) default 0 AFTER owner;" );
16145
    unless ( column_exists('patron_lists', 'shared') ) {
16146
        $dbh->do( "ALTER TABLE patron_lists ADD COLUMN shared tinyint(1) default 0 AFTER owner;" );
16147
    }
16142
    SetVersion( $DBversion );
16148
    SetVersion( $DBversion );
16143
    print "Upgrade to $DBversion done (Bug 19524 - Share patron lists between staff)\n";
16149
    print "Upgrade to $DBversion done (Bug 19524 - Share patron lists between staff)\n";
16144
}
16150
}
Lines 16157-16163 if( CheckVersion( $DBversion ) ) { Link Here
16157
16163
16158
$DBversion = '18.06.00.008';
16164
$DBversion = '18.06.00.008';
16159
if( CheckVersion( $DBversion ) ) {
16165
if( CheckVersion( $DBversion ) ) {
16160
    $dbh->do( "ALTER IGNORE TABLE marc_modification_template_actions CHANGE action action ENUM('delete_field','add_field','update_field','move_field','copy_field','copy_and_replace_field')" );
16166
    $dbh->do( "ALTER TABLE marc_modification_template_actions CHANGE action action ENUM('delete_field','add_field','update_field','move_field','copy_field','copy_and_replace_field')" );
16161
    SetVersion( $DBversion );
16167
    SetVersion( $DBversion );
16162
    print "Upgrade to $DBversion done (Bug 13560 - need an add option in marc modification templates)\n";
16168
    print "Upgrade to $DBversion done (Bug 13560 - need an add option in marc modification templates)\n";
16163
}
16169
}
16164
- 

Return to bug 21129