From a111ffb92e209fbe543eafcf40ecb0957c2f10e1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 Mar 2015 15:38:37 +0100 Subject: [PATCH] Bug 12648: (QA followup) Rename aqorderusers to aqorder_users Signed-off-by: Tomas Cohen Arazi Thanks Jonathan --- C4/Acquisition.pm | 6 +++--- installer/data/mysql/kohastructure.sql | 10 +++++----- installer/data/mysql/updatedatabase.pl | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 273f8c07ce..0bb34c66ef 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2915,7 +2915,7 @@ sub GetOrderUsers { my $query = q| SELECT borrowernumber - FROM aqorderusers + FROM aqorder_users WHERE ordernumber = ? |; my $dbh = C4::Context->dbh; @@ -2948,14 +2948,14 @@ sub ModOrderUsers { my $dbh = C4::Context->dbh; my $query = q| - DELETE FROM aqorderusers + DELETE FROM aqorder_users WHERE ordernumber = ? |; my $sth = $dbh->prepare($query); $sth->execute($ordernumber); $query = q| - INSERT INTO aqorderusers (ordernumber, borrowernumber) + INSERT INTO aqorder_users (ordernumber, borrowernumber) VALUES (?, ?) |; $sth = $dbh->prepare($query); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 5e04530da9..ff6dee2b22 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3089,16 +3089,16 @@ CREATE TABLE `aqorders` ( -- information related to the basket line items ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- --- Table structure for table `aqorderusers` +-- Table structure for table `aqorder_users` -- -DROP TABLE IF EXISTS `aqorderusers`; -CREATE TABLE aqorderusers ( +DROP TABLE IF EXISTS `aqorder_users`; +CREATE TABLE aqorder_users ( ordernumber int(11) NOT NULL, borrowernumber int(11) NOT NULL, PRIMARY KEY (ordernumber, borrowernumber), - CONSTRAINT aqorderusers_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT aqorderusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT aqorder_users_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT aqorder_users_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 184927ddb1..ca0928e2e8 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9807,12 +9807,12 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.19.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do(q| - CREATE TABLE aqorderusers ( + CREATE TABLE aqorder_users ( ordernumber int(11) NOT NULL, borrowernumber int(11) NOT NULL, PRIMARY KEY (ordernumber, borrowernumber), - CONSTRAINT aqorderusers_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT aqorderusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT aqorder_users_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT aqorder_users_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |); -- 2.39.5