• Resolved andrewrhyand

    (@andrewrhyand)


    I’ve tried to manually add the missing tables follow the two SQL code found here: https://www.nextscripts.com/snap-features/snap-wordpress-tables/

    However when running the SQL I get these two errors respectively:
    Invalid default value for ‘date’
    Invalid default value for ‘datecreated’

    Thoughts on a solution?

    Could this also be why the plugin isn’t auto-creating these tables during activation?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author NextScripts

    (@nextscripts)

    What kind of database do you have>

    date datetime DEFAULT ‘0000-00-00 00:00:00’ NOT NULL

    This should be fine under usual DBs.

    Thread Starter andrewrhyand

    (@andrewrhyand)

    I agree. That’s why it’s got me scratching my head.

    I’ve tried on a WAMP install running MYSQL 5.7.14 and
    on Ubuntu (digitalocean) running MYSQL 5.7.17.

    Also I’ve tried creating the tables using both the command line and phpMyAdmin.

    I assume these are usual DBs, right?

    Thread Starter andrewrhyand

    (@andrewrhyand)

    I made some headway.

    Looks like MySQL Strict Mode is the issue with MYSQL 5.7+.

    “Strict mode affects whether the server permits ‘0000-00-00’ as a valid date: If strict mode is not enabled, ‘0000-00-00’ is permitted and inserts produce no warning. If strict mode is enabled, ‘0000-00-00’ is not permitted and inserts produce an error, unless IGNORE is given as well. For INSERT IGNORE and UPDATE IGNORE, ‘0000-00-00’ is permitted and inserts produce a warning.”

    From https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict

    Plugin Author NextScripts

    (@nextscripts)

    Thanks for figuring it out. We will update the default value in the next version.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_nxs_log Table Error’ is closed to new replies.