The swagger definition does not allow for updated_on to be NULL but the database does allow this. If a patron has a null value then the REST service call fails. The history of this is as follows: Bug #10459 (released in 16.05.01) - updated_on field added to borrowers table, NULL allowed Bug #17651 (released in 16.11) - fix swagger definition to allow for NULL "updated_on": { - "type": "string", + "type": ["string", "null"], "description": "time of last change could be useful for synchronization with external systems (among others)" }, Bug #16330 (released in 18.05) - removes the null option from the definition "updated_on": { - "type": ["string", "null"], + "type": "string", "format": "date-time", "description": "time of last change could be useful for synchronization with external systems (among others)" }, You can see that the last push undid the previous bug fix.
I looked at all the branches down to 16.05.x and they all seem to have NOT NULL on the table definition. Maybe this is an update process bug.
I did wonder whether it could be an update issue but I couldn't find any evidence of a script that would have set a value on the column for existing records when the column was added. Does simply changing the column definition to "NOT NULL" cause the default timestamp to be set - if so I really don't understand why it was created with "NULL". Obviously, this leaves me concerned that there could be other other discrepancies - is there an easy way to compare my actual schema to the one the should be installed - I installed v18.05 but my database has the column defined as: `updated_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Thanks
(In reply to Pete Edwards from comment #2) > I installed v18.05 but my database has the column > defined as: > > `updated_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE > CURRENT_TIMESTAMP, borrowers.updated_on has been added by bug 10459, and it was already NOT NULL. Did you mean you did a fresh 18.05(.00?) install and you got this table definition?