From 3c8f661c8797497cbb9d5e5fc635ac5c35580fa1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 25 Apr 2018 09:55:48 -0300 Subject: [PATCH] Bug 19166: Correct charset collate Signed-off-by: Katrin Fischer --- C4/Budgets.pm | 4 ++-- installer/data/mysql/atomicupdate/bug_19166.perl | 2 +- installer/data/mysql/kohastructure.sql | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 817761a..dc105f0 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -338,7 +338,7 @@ sub GetBudgetSpent { datecancellationprinted IS NULL |); $sth->execute($budget_id); - my $sum = 0 + $sth->fetchrow_array; + my $sum = 0 + $sth->fetchrow_array; $sth = $dbh->prepare(qq| SELECT SUM(shipmentcost) AS sum @@ -369,7 +369,7 @@ sub GetBudgetOrdered { datecancellationprinted IS NULL |); $sth->execute($budget_id); - my $sum = 0 + $sth->fetchrow_array; + my $sum = 0 + $sth->fetchrow_array; my $adjustments = Koha::InvoiceAdjustments->search({budget_id => $budget_id, encumber_open => 1, closedate => undef},{ join => 'invoiceid' }); while ( my $adj = $adjustments->next ){ diff --git a/installer/data/mysql/atomicupdate/bug_19166.perl b/installer/data/mysql/atomicupdate/bug_19166.perl index 76a901c..6088e99 100644 --- a/installer/data/mysql/atomicupdate/bug_19166.perl +++ b/installer/data/mysql/atomicupdate/bug_19166.perl @@ -13,7 +13,7 @@ if( CheckVersion( $DBversion ) ) { PRIMARY KEY (adjustment_id), CONSTRAINT invoice_adjustments_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT invoice_adjustments_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE - ) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci " ); $dbh->do("INSERT IGNORE INTO authorised_value_categories (category_name) VALUES ('ADJ_REASON')"); SetVersion( $DBversion ); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 98ef41c..31cbc61 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -840,7 +840,7 @@ CREATE TABLE IF NOT EXISTS invoice_adjustments ( PRIMARY KEY (adjustment_id), CONSTRAINT invoice_adjustments_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT invoice_adjustments_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Table structure for table `issuingrules` -- 2.1.4