Bug 19166: Correct charset collate
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Apr 2018 12:55:48 +0000 (09:55 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 19 Jul 2018 17:28:40 +0000 (17:28 +0000)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Budgets.pm
installer/data/mysql/atomicupdate/bug_19166.perl
installer/data/mysql/kohastructure.sql

index 3ce512d..8e7cc86 100644 (file)
@@ -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 ){
index 76a901c..6088e99 100644 (file)
@@ -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 );
index 1f087d6..f7765a1 100644 (file)
@@ -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`