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

(-)a/C4/Acquisition.pm (-3 / +3 lines)
Lines 2915-2921 sub GetOrderUsers { Link Here
2915
2915
2916
    my $query = q|
2916
    my $query = q|
2917
        SELECT borrowernumber
2917
        SELECT borrowernumber
2918
        FROM aqorderusers
2918
        FROM aqorder_users
2919
        WHERE ordernumber = ?
2919
        WHERE ordernumber = ?
2920
    |;
2920
    |;
2921
    my $dbh = C4::Context->dbh;
2921
    my $dbh = C4::Context->dbh;
Lines 2948-2961 sub ModOrderUsers { Link Here
2948
2948
2949
    my $dbh   = C4::Context->dbh;
2949
    my $dbh   = C4::Context->dbh;
2950
    my $query = q|
2950
    my $query = q|
2951
        DELETE FROM aqorderusers
2951
        DELETE FROM aqorder_users
2952
        WHERE ordernumber = ?
2952
        WHERE ordernumber = ?
2953
    |;
2953
    |;
2954
    my $sth = $dbh->prepare($query);
2954
    my $sth = $dbh->prepare($query);
2955
    $sth->execute($ordernumber);
2955
    $sth->execute($ordernumber);
2956
2956
2957
    $query = q|
2957
    $query = q|
2958
        INSERT INTO aqorderusers (ordernumber, borrowernumber)
2958
        INSERT INTO aqorder_users (ordernumber, borrowernumber)
2959
        VALUES (?, ?)
2959
        VALUES (?, ?)
2960
    |;
2960
    |;
2961
    $sth = $dbh->prepare($query);
2961
    $sth = $dbh->prepare($query);
(-)a/installer/data/mysql/kohastructure.sql (-5 / +5 lines)
Lines 3089-3104 CREATE TABLE `aqorders` ( -- information related to the basket line items Link Here
3089
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3089
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3090
3090
3091
--
3091
--
3092
-- Table structure for table `aqorderusers`
3092
-- Table structure for table `aqorder_users`
3093
--
3093
--
3094
3094
3095
DROP TABLE IF EXISTS `aqorderusers`;
3095
DROP TABLE IF EXISTS `aqorder_users`;
3096
CREATE TABLE aqorderusers (
3096
CREATE TABLE aqorder_users (
3097
    ordernumber int(11) NOT NULL,
3097
    ordernumber int(11) NOT NULL,
3098
    borrowernumber int(11) NOT NULL,
3098
    borrowernumber int(11) NOT NULL,
3099
    PRIMARY KEY (ordernumber, borrowernumber),
3099
    PRIMARY KEY (ordernumber, borrowernumber),
3100
    CONSTRAINT aqorderusers_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3100
    CONSTRAINT aqorder_users_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3101
    CONSTRAINT aqorderusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
3101
    CONSTRAINT aqorder_users_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
3102
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3102
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3103
3103
3104
--
3104
--
(-)a/installer/data/mysql/updatedatabase.pl (-4 / +3 lines)
Lines 9807-9818 if ( CheckVersion($DBversion) ) { Link Here
9807
$DBversion = "3.19.00.XXX";
9807
$DBversion = "3.19.00.XXX";
9808
if ( CheckVersion($DBversion) ) {
9808
if ( CheckVersion($DBversion) ) {
9809
    $dbh->do(q|
9809
    $dbh->do(q|
9810
        CREATE TABLE aqorderusers (
9810
        CREATE TABLE aqorder_users (
9811
            ordernumber int(11) NOT NULL,
9811
            ordernumber int(11) NOT NULL,
9812
            borrowernumber int(11) NOT NULL,
9812
            borrowernumber int(11) NOT NULL,
9813
            PRIMARY KEY (ordernumber, borrowernumber),
9813
            PRIMARY KEY (ordernumber, borrowernumber),
9814
            CONSTRAINT aqorderusers_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE,
9814
            CONSTRAINT aqorder_users_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE,
9815
            CONSTRAINT aqorderusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
9815
            CONSTRAINT aqorder_users_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
9816
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
9816
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
9817
    |);
9817
    |);
9818
9818
9819
- 

Return to bug 12648