[Koha-bugs] [Bug 27253] borrowers.updated_on cannot be null on fresh install, but can be null with upgrade

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 22 13:41:11 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27253

--- Comment #9 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
FROM_UNIXTIME(0) does not seem to work

MariaDB [koha_kohadev]> update borrowers set updated_on="1970-01-01 00:00:01"
where borrowernumber=1;
Query OK, 1 row affected (0.011 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [koha_kohadev]> update borrowers set updated_on="1970-01-01 00:00:00"
where borrowernumber=1;
Query OK, 1 row affected, 1 warning (0.012 sec)
Rows matched: 1  Changed: 1  Warnings: 1

MariaDB [koha_kohadev]> select updated_on from borrowers where
borrowernumber=1;
+---------------------+
| updated_on          |
+---------------------+
| 0000-00-00 00:00:00 |
+---------------------+
1 row in set (0.001 sec)

MariaDB [koha_kohadev]> show warnings;
+---------+------+-----------------------------------------------------+
| Level   | Code | Message                                             |
+---------+------+-----------------------------------------------------+
| Warning | 1264 | Out of range value for column 'updated_on' at row 1 |
+---------+------+-----------------------------------------------------+
1 row in set (0.000 sec)

MariaDB [koha_kohadev]> update borrowers set updated_on="1970-01-01 00:00:01"
where borrowernumber=1;
Query OK, 1 row affected (0.011 sec)
Rows matched: 1  Changed: 1  Warnings: 0

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list