Commit Graph

4916 Commits

Author SHA1 Message Date
Tomas Cohen Arazi 26d6c99b3f Bug 31086: (QA follow-up) Use plain SQL in db_rev
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit efd2dfdaae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f72d4a85a0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-09-12 13:59:21 +02:00
Nick Clemens 74684039b6 Bug 31086: Notify of problematic holds during upgrade
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0704102bc8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 097969ac4d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-09-12 13:59:21 +02:00
Martin Renvoize 3683037c3b Bug 31086: (QA follow-up) Improve atomicupdate to be more resilient
We now populate the branchcode field with the first available branch on
the system if we find it to be NULL before we set the NOT NULL

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5fa510b431)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 13a3b0be9c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-09-12 13:59:21 +02:00
Martin Renvoize e416ab92fe Bug 31086: (QA follow-up) Remove DEFAULT from column
There's no need to have a default here, and in fact it doesn't make
sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d731943c24)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4db94b43c8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-09-12 13:54:15 +02:00
Arthur Suzuki 7e004b9a0d DBRev 21.11.11.000
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-08-22 10:45:16 +02:00
Arthur Suzuki c7e88eff1b DBRev 21.11.10.001 2022-08-16 11:02:36 +02:00
Tomas Cohen Arazi 66ddca825d Bug 24010: (QA follow-up) Correct COMMENT syntax
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 29a9d790e8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9f83bad68c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-08-16 10:53:23 +02:00
Jonathan Druart 7ae4128e74 Bug 24010: DB Changes
Amended-patch: adjusted to new atomic update format

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a7eee10279)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 07d00657e0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-08-16 10:53:18 +02:00
Petro Vashchuk 9f79d77171 Bug 30775: Make 952w to have datepicker plugin by default
This field (Price effective from) is very similar to 952d,
but it doesn't have dateaccessioned.pl plugin by default,

Apart of worse usability of this it is also allows to enter wrong
date which will be converted in 0000-00-00 in DB and even lead to
crashes by code in other places.

So, adding this plugin not only improves usability (user can have
datepicker) but also adds date field validation.

Test plan:
1. Head over to MARC frameworks from your administration page,
check 952 subfield structure of your default framework structure.
2. dateaccessioned.pl is set as a plugin for 952d by default
but is missing from 952w.
3. Apply the patch and reset your koha, drop db and use reset_all alias.
4. Check frameworks structure again and ensure that datepicker plugin
is set by default for 952w.
5. Edit some item to ensure that datepicker works for that 952w.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b25dfb50a1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 588377511b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-08-11 15:04:44 +02:00
Arthur Suzuki fdfbdf232b Add db_revs file for 21.11.10 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-07-22 14:57:55 +02:00
Arthur Suzuki aee21ea245 Fix db_revs/211109000.pl permissions
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-06-29 08:33:58 +00:00
Arthur Suzuki 5c28b27dcd Update release notes for 21.11.09 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2022-06-27 15:31:43 +02:00
Kyle Hall 3c638471a0 Increment version for 21.11.06 release
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
2022-05-25 11:37:48 -04:00
Kyle Hall b6e3c442d8 Fix translations for Koha 21.11.06
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
2022-05-25 11:18:28 -04:00
Marcel de Rooy 5bed1a0058 Bug 30620: Add a warning about /*!VERSION lines in kohastructure
Also adding a similar comment in C4::Installer.

No test plan, just documentation.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-13 11:50:57 -04:00
Kyle Hall 5f543cf407 Bug 30572: DBRev 21.11.05.005
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 14:01:05 -04:00
Marcel de Rooy 794a6d4530 Bug 30572: Dbrev for search_marc_to_field.sort
Test plan:
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 14:00:26 -04:00
Marcel de Rooy 1c35945ba6 Bug 30572: Adjust search_marc_to_field.sort in kohastructure
Test plan:
New install or run kohastructure on empty database.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 14:00:26 -04:00
Kyle Hall abdb79a067 Bug 20449: DBRev 21.11.05.004
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:57:04 -04:00
Tomas Cohen Arazi d41a9d2bb2 Bug 30449: (QA follow-up) Report back on problematic situations
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:56:29 -04:00
Marcel de Rooy ceb65c12ba Bug 30449: Add missing FK constraint on borrower_attribute_types
Old Koha databases probably have it, newer ones might not.
See also BZ description.

Test plan:
[1} Check SHOW CREATE TABLE borrower_attribute_types to see if you
    have any index and FK constraint on category_code.
[2] Run updatedatabase.
[3] If you had category_code_fk, it should be replaced.
[4] Remove index and constraint again using things like:
    alter table borrower_attribute_types drop constraint `borrower_attribute_types_ibfk_1`;
    alter table borrower_attribute_types drop index category_code;
[5] Run updatedatabase.
[6] You should have KEY category_code and FK borrower_attribute_types_ibfk_1.
[7] Run updatedatabase. Idempotent, no changes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:56:29 -04:00
Kyle Hall 3d80904e62 Bug 30565: DBRev 21.11.05.003
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:54:45 -04:00
Marcel de Rooy bb21039352 Bug 30565: Database revision for stockrotationrotas
Add unique key if needed.
Adjust description column to make it NOT NULL.

Test plan:
(Optionally:) Drop unique key, make description nullable.
Run dbrev.
Check if unique key present, and description not-nullable.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:53:20 -04:00
Marcel de Rooy 8911cbb0ef Bug 30565: Correct kohastructure
The unique key was added in a dbrev and is referred to in code.
But forgotten in kohastructure.

Test plan:
Run new install or kohastructure.sql on empty db.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:53:20 -04:00
Kyle Hall 1f035e708f Bug 29092: DBRev 21.11.05.002
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:45:24 -04:00
Emmi Takkinen 42ba5b12bf Bug 29092: Add timestamp to account-fines table column settings
Table settings for the account_fines table (in the Patrons section, the
"Transactions" table in a patron account) are missing a checkbox for the
"Updated On" column. Because of this, one cannot hide the Updated On
column and any other values one sets here get applied to the wrong
columns.

This patch adds timestamp to account-fines column settings.
To test:

1) Navigate to columns settings page and modify account-fines tables
   column.
   => Note that if you hide e.g. account_type column, column
   credit_number is hidden on patrons account page
2) Apply patch and update database.
   => Account-fines column settings has now a option to hide timestamp.
   => Correct columns should now be hidden.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-05-06 13:43:51 -04:00
Marcel de Rooy 4c263cb9cf Bug 27253: (follow-up) Fix UNIXTIME(0) in db_revs/211200037.pl
MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(0) ) where borrowernumber=51;
ERROR 1292 (22007): Incorrect datetime value: '1970-01-01 00:00:00' for column `koha_myclone`.`borrowers`.`updated_on` at row 1

MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(1) ) where borrowernumber=51;
Query OK, 1 row affected (0.008 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by switching updated_on to datetime. Remove NOT NULL, etc.
Copied dbrev to atomicupdate folder.
Resulted in:
    Updated all NULL values of borrowers.updated_on to GREATEST(date_renewed, dateenrolled, lastseen): 51 rows updated

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-04-29 13:35:04 -04:00
Kyle Hall 8d30f50b53 Bug 27253: DBRev 21.11.05.001
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-04-29 13:29:06 -04:00
Julian Maurice a0aa1fb1cc Bug 27253: Fix definition of updated_on in borrowers and deletedborrowers
Test plan:
1. First you have to be in a state where updated_on is NULL-able. You
   can do that by either:
   a) do a fresh install of Koha 16.05 and update to master, or
   b) execute the following SQL queries:

     ALTER TABLE borrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'

     ALTER TABLE deletedborrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'
2. Create two borrowers (let's name them X and Y)
3. Delete borrower Y
4. Set the column updated_on to NULL for both borrowers by executing the
   following SQL query:
   UPDATE borrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of X>
   UPDATE deletedborrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of Y>
5. Apply patch and run updatedatabase
6. Verify that borrowers.updated_on and deletedborrowers.updated_on are
   not NULL-able.
   Verify that updated_on for X and Y have taken the value of
   dateenrolled.
7. Repeat step 2 to 6 but this time renew the patron and/or log in with
   its account in order to set the columns borrowers.date_renewed and
   borrowers.lastseen before executing updatedatabase
   borrowers.updated_on should take the greatest value among
   dateenrolled, date_renewed, and lastseen

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-04-29 13:27:25 -04:00
Kyle Hall 7773e3a9cc Increment version for 21.11.05 release 2022-04-26 11:06:55 -04:00
Kyle Hall f260ee5c37 Bug 30498: DBRev 21.11.04.004
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-04-15 08:14:16 -04:00
Marcel de Rooy ccc218b04d Bug 30498: Fix enum search_field.type
Resolves sync issue with upgrades.

Test plan:
Run dbrev.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-04-15 08:11:41 -04:00
Kyle Hall de8b86f789 Bug 30481: DBRev 21.11.04.003
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-04-15 08:08:05 -04:00
Marcel de Rooy 88977b0957 Bug 30481: Drop unique constraint deleteditemsstocknumberidx
Resolves a sync issue between database and schema caused by
differences between structure and upgrades. Note: newer
databases do not contain this index any longer.

Test plan:
Run dbrev.
Check SHOW CREATE TABLE deleteditems.
Verify that unique index has been dropped, regular index added.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-04-15 08:07:06 -04:00
Kyle Hall 54b59e729c Bug 27812: DBRev 21.04.002
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-25 09:31:12 -04:00
Martin Renvoize 5a65981e10 Bug 27812: (QA follow-up) Fix atomicupdate
We removed a bit too much from the skeliton here ;)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-25 09:30:19 -04:00
Kyle Hall 1c006d0e55 Bug 27812: Add DBRev to warn of the change to the account details notice
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-25 09:30:19 -04:00
Kyle M Hall 49f36e7109 Bug 27812: Remove the ability to transmit a patron's plain text password over email
We should not give libraries the ability to compromise patron accounts,
it is considered a huge security issue and nobody in network security
would never recommend allowing passwords to be transmitted in clear text
over email.

It should simply not be possible to send a patron's password in plain text
via email. As such, we should remove this ability from Koha.

Test Plan:
1) Apply this patch
2) Create a patron to generate the ACCTDETAILS email
3) Note you can no longer transmit the patron's password in the email

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-25 09:30:19 -04:00
Kyle M Hall d038a29457 Bug 29596: DBRev 21.11.04.001 2022-03-25 08:14:43 -04:00
Kyle Hall b371edbb08 Increment version for 21.11.04 release
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
2022-03-24 13:53:55 -04:00
Kyle Hall 517e5f073c Bug 30203: DBrev 21.11.03.001
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-11 06:25:59 -05:00
Fridolin Somers 2094162a26 Bug 30128: Change language_subtag_registry.description to varchar(255)
In database, language_descriptions.description is VARCHAR(255).
language_subtag_registry.description is VARCH(25), it should have same size.

You can see in https://www.loc.gov/standards/iso639-2/php/code_list.php there is for example 'South American Indian languages'

Test plan :
1) Run atomic update
2) Check language_subtag_registry.description is now varchar(255)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-11 06:24:39 -05:00
Fridolin Somers c0e4d9ae7f Bug 30185: Missing return in db rev 210600003.pl
db rev files are constructed with a return {...}, db rev 210600003.pl is missing return word.
I don't know if it can impact the db upgrade but we should fix it for consistency.

To test upgrade from a version 21.05 and check db rev is applied.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-04 08:25:21 -05:00
Kyle M Hall 9dc391132f Increment version for 21.11.03 release
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-02-25 13:34:10 -05:00
Tomas Cohen Arazi 808fb2679b Bug 29596: Add Yiddish language
This patch adds the Yiddish language to Koha. The language codes were
taken from https://www.loc.gov/standards/iso639-2/php/code_list.php

Sponsored-by: Universidad Nacional de San Martín

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-02-07 13:20:30 -05:00
Kyle Hall e309da639f Bug 29943: DBRev 21.11.02.004
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-02-07 12:54:17 -05:00
Marcel de Rooy b5a8b89258 Bug 29943: Db rev: replace typo in existing notices
Test plan:
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-02-07 12:53:22 -05:00
Marcel de Rooy 13b3ea4b9a Bug 29943: Fix NOTIFY_MANAGER notice in sample notices
Test plan:
Look good at this change, or do a new install :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-02-07 12:53:17 -05:00
Kyle Hall e51f46b5b8 Bug 29605: DBRev 21.11.02.003
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-02-07 12:33:13 -05:00
Jonathan Druart 1b4c770daa Bug 29605: branchtransfers.cancellation_reason
reason and cancellation_reason was inversed, and the enum values were
lower cases

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-02-07 12:31:18 -05:00