OpenDMARC icon indicating copy to clipboard operation
OpenDMARC copied to clipboard

schema.mysql not work

Open dewfalse opened this issue 4 years ago • 5 comments

#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

dewfalse avatar Jul 14 '21 06:07 dewfalse

The default value for lastsent should be '0000-00-00 00:00:00' the used value is reserved.

jbouwh avatar Sep 06 '21 09:09 jbouwh

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.

jbouwh avatar Sep 19 '21 20:09 jbouwh

The default value for lastsent should 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.

glts avatar Sep 20 '21 11:09 glts

https://mariadb.com/kb/en/timestamp/ See info at section Limitations

jbouwh avatar Sep 20 '21 12:09 jbouwh