Commit graph

2295 commits

Author SHA1 Message Date
e09cfd5d55 Bug 28258: DBRev 20.12.00.043
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-30 17:07:31 +02:00
d299e1ffc6 Bug 28258: Fix existing occurrence
I think it's good to fix the original problem as well

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-30 17:07:31 +02:00
ebecee43a2 Bug 17202: DBRev 20.12.00.042
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:16:14 +02:00
f29a41288c Bug 27842: (follow-up) Correct existing serail/subscriptionhistory before deletion
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:06 +02:00
1937f1b1d1 Bug 26734: DBRev 20.12.00.041
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
769a939b25 Bug 27971: DBRev 20.12.00.040
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
d70a60e5ce Bug 12362: DBRev 20.12.00.039
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
1863e02841 Bug 27281: DBRev 20.12.00.038
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
bb3c38f4c4 Bug 23971: DBRev 20.12.00.037
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
1ac1067b64 Bug 16787: DBRev 20.12.00.036
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:50:11 +02:00
2efad4356c Bug 23207: DBRev 20.12.00.035
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:37:14 +02:00
da29bf48db Bug 20854: DBRev 20.12.00.034
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 10:51:29 +02:00
adf73341e6 Bug 26940: DBRev 20.12.00.033
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 10:51:29 +02:00
051a9d740f Bug 15986: DBRev 20.12.00.032
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 14:34:51 +02:00
49a795ceb3 Bug 21260: DBRev 20.12.00.031
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-14 16:07:55 +02:00
871a2fc6ff Bug 21549: DBRev 20.12.00.030
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-14 15:34:27 +02:00
aa71e7132c Bug 14233: Set default for NoticesLog to 0
To prevent a warning on the about page:
 System preference 'NoticesLog' must be '0' or '1', but is ''.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-13 10:46:02 +02:00
611d3aa483 Bug 27726: DBRev 20.12.00.029
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-12 15:27:50 +02:00
aad8699b01 Bug 14233: DBRev 20.12.00.028
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-09 16:05:48 +02:00
4bfc2584e0 Bug 27069: DBRev 20.12.00.027
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-08 12:15:49 +02:00
f6d2a50478 Bug 26498: DBRev 20.12.00.026
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-08 12:15:44 +02:00
4e17726829 Bug 27835: DBRev 20.12.00.025 2021-03-18 15:04:47 +01:00
e01bff1135 Bug 18532: DBRev 20.12.00.024
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
8efc21385a Bug 27652: DBRev 20.12.00.023
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 17:20:47 +01:00
7e66d32be4 Bug 12224: DBRev 20.12.00.022
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:54:02 +01:00
75a210aef4 Bug 22824: DBRev 20.12.00.021
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:26:04 +00:00
80e3bfd376 Bug 24446: DBRev 20.12.00.020
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
c004a9128a Bug 26057: DBRev 20.12.00.019
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
8df3e02885 Bug 27808: (QA follow-up) Make sure the update catches the items we want
This query:

SELECT *
FROM items
LEFT JOIN issues
ON issues.itemnumber=items.itemnumber
WHERE items.onloan IS NULL;

returns 961 rows on the sample data, with 2 items checked out and onloan
set to NULL.

With this tweak, the query only matches the 2 checkout items with onloan
set to NULL:

SELECT *
FROM items
LEFT JOIN issues
ON issues.itemnumber=items.itemnumber
WHERE items.onloan IS NULL AND issues.issue_id IS NOT NULL;

This is the query that needs to be used on the atomic update for
filtering the items to be updated.

This patch does that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-02 09:03:36 +01:00
aa41987dbf Bug 27808: DBRev 20.12.00.018
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
cb9cd28bac Bug 26937: DBRev 20.12.00.017
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
24df853064 Bug 8976: DBRev 20.12.00.016
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
482d77b536 Bug 27316: DBRev 20.12.00.015
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
3710f34f1b Bug 7806: DBRev 20.12.00.014
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:28:02 +01:00
3e3803ee20 Bug 27821: Make sanitize_zero_date support datetime and timestamp
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:16:42 +01:00
57a15eb474 Bug 27534: Add missing ON UPDATE/DELETE clause to message_transport_type_fk
Bug 9016 (3.15.00.039) added message_transport_type_fk but the ON DELETE
CASCADE ON UPDATE CASCADE clause was missing from the updatedatabase
entry.
If we are upgrading from an old version, 20.06.00.058 will fail on
updating the message_transport_type, with
"Cannot delete or update a parent row: a foreign key constraint fails".

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:12:51 +01:00
63e3311b10 Bug 26997: (QA follow-up) Fix Typo
Feel free to squash this ;)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:49 +01:00
0a40b4bb50 Bug 26997: CAST AS CHAR to prevent the error
To prevent the DBMS to fail on 0000-00-00 we can cast it as a char and
compare.
This patch also moves to a subroutine, in case we need to adjust (or
reuse) it later.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:49 +01:00
3c087bc216 Bug 26997: Fix upgrade process under MySQL 8
If you are coming from an old version of Koha, you may face an upgrade
error for the SQL query using 0000-00-00.
The idea was to fix it, but actually the DBMS will raise an error (not
blocking the upgrade process however).

We can hide them to not cause confusion

Errors are like:
DBD::mysql::db do failed: Incorrect date value: '0000-00-00' for column 'suggesteddate' at row 1 [for Statement "UPDATE suggestions SET suggesteddate = '1970-01-01' WHERE suggesteddate = '0000-00-00';"] at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 23312.

Test plan:
Checkout an old version of Koha (3.20, not older)
Insert a dump, install Koha
Checkout a recent version of Koha, apply the patch (or use master)
Execute the upgrade process
You should not see the errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:49 +01:00
6bd75d6dca Bug 24108: DBRev 20.12.00.013
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:29:30 +01:00
539af7bd5a Bug 27598: DBRev 20.12.00.012
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 12:06:08 +01:00
91ddddd8eb Bug 18506: DBRev 20.12.00.011
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:48:49 +01:00
8302be444a Bug 20410: DBRev 20.12.00.010
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 17:08:41 +01:00
3439d04e1e Bug 27581: DBRev 20.12.00.009
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:56:00 +01:00
bab6a08ac9 Bug 27466: Don't use set_preference from updatedatabase.pl
We must never use subroutines or methods from updatedatabase.pl!

Having it using C4::Context->set_preference will call
Koha::Config::Syspref->store then C4::Log::logaction and finally
Koha::Logger->get which will need the log4perl configured correctly
(which is not necessary the case when you upgrade).

Test plan:
git checkout ed3e4540d7 (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 0
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is an empty string
git checkout ed3e4540d7 (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 1
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is set to "opac"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:55:59 +01:00
940c0e319a Bug 25552: DBRev 20.12.00.008
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 17:25:22 +01:00
b0bdaab666 Bug 27486: DBRev 20.12.00.007
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:45 +01:00
72346502d9 Bug 27487: DBRev 20.12.00.006
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:42 +01:00
9dd87e9b73 Bug 27491: DBRev 20.12.00.005
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 14:59:27 +01:00
46a403a356 Bug 27485: DBRev 20.12.00.004
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 14:59:27 +01:00