schema.mysql not work
#mysql -h localhost -u opendmarc < /usr/share/opendmarc/db/schema.mysql ERROR 1067 (42000) at line 58: Invalid default value for ‘lastsent’
using MariaDB 5.5.68
The default value for lastsent should be '0000-00-00 00:00:00' the used value is reserved.
Found out the arc field in table needs to have a default value. Running opendmarc-import I get the following error:
opendmarc-import: failed to insert message: Field 'arc' doesn't have a default value
So, setting the default value on the arc field to NULL solves another issue with the database schema.
The default value for
lastsentshould be'0000-00-00 00:00:00'the used value is reserved.
This is likely incorrect, given that the current (wrong) default value 1970-01-01 00:00:00 was substituted for 0000-00-00 00:00:00 in #99. A value that works more reliably might be 1970-01-01 00:00:01.
https://mariadb.com/kb/en/timestamp/
See info at section Limitations