Commit graph

4374 commits

Author SHA1 Message Date
feab2cbeb2
Bug 21294: Replace BOOLEAN with TINYINT(1) in our DB structure
To match the coding guideline SQL12.
We do this for consistency.
Note that we do not need an update DB as BOOLEAN is an alias for
TINYINT(1).

The is_boolean flags have been added to the schema.

Test plan:
1. `dbic` should run correctly
2. kohastructure.sql should be syntaxicaly correct
3. `git grep -i boolean installer/data/mysql/kohastructure.sql`
should not return relevant occurrences.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 16:58:45 +01:00
733874e24e
Bug 25045: (RM follow-up) Correction to updatedatebase.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 13:42:26 +01:00
19a241c131
Bug 25045: (RM follow-up) Add the RESTPublicAnonymousRequests syspref
The atomic update alos included a quoting mistake

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:51:44 +01:00
8d77db2769
Bug 25045: (follow-up) Add the RESTPublicAnonymousRequests syspref
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:50:24 +01:00
93c0f4420d
Bug 23081: DBRev 19.12.00.080
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:34:29 +01:00
e116f744a0
Bug 23081: atomicupdate for change to existing installs
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:32:47 +01:00
ec1bfd2b74
Bug 23081: set default to 0 for items.issues and deleteditems.issues
To test:
- save and run this sql query in reports: select sum(if(issues is null,1,0)),sum(if(issues=0,1,0)) from items
- you should see a lot of nulls and no zeros
- apply patch
- updatedatabase
- re-run your query and see that your nulls have changed to zeros
- create a new item
- rerun your query and see your new item is counted in the zeros, not the nulls

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:32:37 +01:00
6c1a4312c4
Bug 25045: DBRev 19.12.00.079
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:17:33 +01:00
5394e8443f
Bug 25045: Add the RESTPublicAnonymousRequests syspref
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:15:21 +01:00
Bernardo Gonzalez Kriegel
69b1a62aa4
Bug 24897: Remove es-ES installer data
With installer data in YAML format and it's translations,
there are no need for localized installer files.

This patch removes es-ES installer files.

To test on top of Bug 24871
1) Apply the patch
2) Translate to spanish
   cd misc/translator
   ./translate update es-ES
   -/translate install es-ES
3) Do a clean install using es-ES,
   check no problems during install
4) Verify MARC21 frameworks, they must
   be translated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:12:07 +01:00
c42674cfd9
Bug 24913: DBRev 19.12.00.078
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-21 12:34:04 +01:00
Aleisha Amohia
3d022f0f27
Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref
To test:
1) update database, restart memcached/plack
2) Go to Administration -> System preferences -> OPAC tab. Enable the
new PatronSelfRegistrationConfirmEmail system preference. Enable other
required self registration sysprefs.
3) Go to the OPAC home page. (You may need to log out). Click the
'Register' link so you are redirected to the member entry form.
4) Notice the 'Confirm primary email' field after the 'primary email'
field. Put 'a@a.com' in primary email, and 'b@b.com' in the confirm
field. Scroll to the end of the form and Submit.
5) Confirm the form is not successfully submitted, and an error message
is shown to indicate the email addresses do not match.
6) Confirm you cannot cut, copy or paste in either the primary email or
confirm primary email fields. Confirm the right click menu doesn't work
in these fields.

7) Disable javascript in your browser.
8) Repeat steps 3 and 4.
9) Confirm there is an error message to indicate the email addresses do
not match.

10) Re-enable javascript. Fill in the form correctly with matching email
addresses and confirm it successfully submits.

11) Disable the PatronSelfRegistrationConfirmEmail syspref.
12) Attempt to register an account on the OPAC again. Confirm the
'confirm email address' field is gone and form works as expected.
13) Re-enable the PatronSelfRegistrationConfirmEmail syspref.
14) Log in to the OPAC and go to your personal details
15) Edit the primary email field
16) Confirm you are able to submit your changes (you should not see an
error about emails not matching).

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: holly <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-21 12:30:40 +01:00
66135bc4c5
Bug 23727: DBRev 19.12.00.077
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 13:49:05 +01:00
e08eae728c
Bug 23727: Add new columns
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 13:45:40 +01:00
2b7ac72d70
Bug 22887: (RM follow-up) Restore warnings in updatedatabase
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 10:21:43 +01:00
0e9d45e7b4
Bug 21901: DBRev 19.12.00.076
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 10:17:32 +01:00
7d09c46cf7
Bug 21901: (QA follow-up) Add a few NOT NULL constraints in dbrev
We need to specify NOT NULL on subscription and -history as well.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:40:08 +01:00
cd5be73042
Bug 21901: Add a warning if we removed entries
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:39:57 +01:00
021598e8a4
Bug 21901: (QA follow-up) Ensure consistent data before adding keys
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:39:14 +01:00
9287585f38
Bug 21901: Add FK on subscription and serial tables
In order to improve performance in the serial modules and add DB constraints,
this patch is going to add missing foreign key on the following columns:
 * serial.biblionumber
 * serial.subscription
 * subscriptionhistory.biblionumber
 * subscriptionhistory.subscriptionid
 * subscription.biblionumber

Once done, some code can be removed from the Del* subroutines, as the ON
CASCASE clause will make the RDBMS handles the deletions.

Test plan:
0/ It would be useful to test the update DB entry on a big and old
production DB, to make sure the constraints will be added correctly.
We could remove the entries before creating the constraints, but it can
be unecessary
1/ Make sure you can recreate a fresh install with the kohastructure.sql
from this patch
2/ Make sure you can upgrade from a master install
3/ Create a subscription, serial, etc. and delete the biblio
=> The subscription/serials should have been deleted from the DB
4/ Create a subscription, serial, etc. and delete the subscription
=> The serials should have been deleted from the DB

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:39:00 +01:00
2d5d9a54bd
Bug 25086: DBRev 19.12.00.075
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:13:31 +01:00
Agustin Moyano
039afd0936
Bug 25086: Set changed_fields column as nullable
This patch changed_fields column as nullable.

To test:
1. Do not apply any patch
2. Set PatronSelfRegistrationVerifyByEmail preference to require
3. Fill self registration form in opac and submit
CHECK => OPAC dies with a nasty message, that says Field 'changed_fields' doesn't have a default value
4. Apply this patch and updatedatabase
5. Repeat step 3
SUCCESS => Registry process continues as expected
6. Sign off

Sponsored-by: Orex Digital
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:10:55 +01:00
edee0266c4
Bug 25147: DBRev 19.12.00.074
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 08:25:20 +01:00
7fb2524a9a
Bug 25147: Rename preference
This patch renames the preference from the ambiguous 'AllowSelfCheckReturns'
to 'SCOAllowCheckin' which is more consistent with other preferences
affecting this module.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 08:23:11 +01:00
67c7b281ae
Bug 25152: (RM follow-up) Correction to update description
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 08:23:11 +01:00
48188a1065
Bug 24131: Prevent the first description to be displayed twice
If there are several lines to display, the first one was displayed
twice:
Upgrade to 19.12.00.071 done [13:10:22]: Bug 22887 - Add unique constraint to authorised_values
                                                   - Add unique constraint to authorised_values
                                                   - WARNING - Cannot create unique constraint on authorised_value(category, authorised_value)
                                                   - The following entries are duplicated: COUNTRY:aaa (2)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 14:21:01 +01:00
36cb0e6ae4
Bug 22887: Remove superfluous warn statements
We print them in the description later

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 14:12:13 +01:00
c6b6b0a427
Bug 22887: Fix SQL syntax for MySQL 5.5
This does not happen on MySQL 8 or latest MariaDB, but does on MySQL 5.5

"Non-grouping field 'c' is used in  HAVING clause"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 14:11:55 +01:00
4da2a353b7
Bug 25152: DBRev 19.12.00.073
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:37:24 +01:00
b87fdec6da
Bug 25152: Make subscription.closed tinyint(1)
https://wiki.koha-community.org/wiki/Coding_Guidelines#SQL12:_Booleans

Boolean fields must be tinyint(1), not int(1)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:33:33 +01:00
0f3c451c9d
Bug 24380: DBRev 19.12.00.072
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:30:12 +01:00
806bee5a2e
Bug 24380: Add syspref CalculateFinesOnBackdate
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:28:39 +01:00
c0f79717ee
Bug 22784: (QA follow-up) booleans should be TINYINT
As per the coding guidelines, they should be TINYINT(1).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:21:57 +01:00
3999741d4a
Bug 22887: DBRev 19.12.00.071
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
66b62058d6
Bug 22887: Remove dup fr-FR for existing installs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
323e1a2a2f
Bug 22887: Remove dup in fr-FR av.sql
https://en.wikipedia.org/wiki/Cocos_(Keeling)_Islands
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
b925d88de1
Bug 22887: Warn if duplicates exist
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
2ce0327480
Bug 22887: Add unique constraint to authorised_values
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
fc29f2afa1
Bug 22774: DBRev 19.12.00.070
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:52:49 +01:00
Katrin Fischer
860264af6f
Bug 22774: (QA follow-up) Add syspref descriptions to database update and sysprefs.sql
Moves the updatedatabase entry to the new format and
adds information for the explanation column of the
systempreferences table.

Also slightly rephrases the description in the system preference
editor.

To test:
- Verify database update still works the same with addition
  of explanations
- Verify the sys pref description makes sense

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:42:21 +01:00
Nazlı Çetin
294d6f54e5
Bug 22774: New systempreferences for suggestions added to sysprefs.sql
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:42:03 +01:00
86db304cd4
Bug 22784: DBRev 19.12.00.069
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:25:31 +01:00
fd831a0788
Bug 22784: DB Changes
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:18:53 +01:00
63b44f2ddd
Bug 21190: DBRev 19.12.00.068
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:13:40 +01:00
c0f615fe53
Bug 21190: Introduce preferences AuthFailureLog and AuthSuccessLog
Test plan:
Run atomic update.
Check the Logs tab of preferences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:13:39 +01:00
30ea935720
Bug 20754: (RM follow-up) Fix DB Update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:13:25 +01:00
6ac037f817
Bug 24840: Replace DateTime->now with dt_from_string
We should use Koha::DateUtils instead of Date::Time directly

This patch simplay replaces calls to now() with a call to dt_from_string()
which does effectively the same thing.

Probably reading the code and verifying changes is sufficient but...

To test:
1 - confirm the files all compile
2 - confirm all tests pass
3 - confirm Koha still works

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-08 11:54:23 +01:00
c80ced404f
Bug 20754: DBRev 19.12.00.067
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-06 12:28:58 +01:00
875108d46e
Bug 20754: DB revision to remove double accepted shares
[Originally submitted for bug 11943, parked at 20754.]
[Attempt to revive it now.]

Although it is no problem to have them, we could do a cleanup.
This patch just removes duplicate rows from the table.

Note: I considered adding a unique index like:
    ALTER TABLE virtualshelfshares ADD UNIQUE INDEX (shelfnumber, borrowernumber, invitekey);
But the possible NULL values in borrowernumber and/or invitekey require
additional code changes. So I left it alone.

Test plan:
[1] Create two records with same borrowernumber and shelfnumber in the shares
    table, if not present already.
[2] Run updatedatabase.pl

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-06 12:25:30 +01:00
ce940939d4
Bug 4461: DBRev 19.12.00.066
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-06 11:25:02 +01:00