Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT

Hi,

I'm trying to do a fresh install of Vanilla 2.6.1. Only getting the following error at the installation page:

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT

I need to update from an existing Vanilla Forum version 2.2rc1. Since this is a very large community we've decided to firstly thoroughly test the new environment before importing the old version.

I've read the following post https://open.vanillaforums.com/discussion/36296/incorrect-table-definition-there-can-be-only-one-timestamp-column-with-current-timestamp-in-default

While meeting the minimum requirements defined in this github readme, I will need to upgrade my Database version, which is a big issue.

We're hosting multiple domains (about 30) and cannot upgrade a single database on one domain. For Vanilla Forums to work we need to update all databases in our hosting, which may damage existing tables.

Is there some way to fix this issue without upgrading from database version: 5.5.60-MariaDB.

Comments

  • Yes and no...

    As far as I know, only the GDN_AccessToken uses two current timestamps columns. You can
    1. change the /applications/dashboard/settings/structure.php so that DateExpires has no default value any more
    2. add a trigger to the database so that whenever a row is created in GDN_AccessToken, the field DateExpires is set to the value of DateInserted

    That is possible, but you will run into problems on each update, might severe security issues in the future when the trigger gets messed up for any reason.

    So, yes, you can do this with a lot of effort, but no, don't do that! Try to get a set up where you do not have to depend on the weakest part and therefore have always pick the oldest software packages. I would start investigating on using container software like docker would be a possibility to be able to use most current software packages whenever possible.

  • Previously, at most one TIMESTAMP column per table could be automatically initialized or updated to the current date and time. This restriction has been lifted. Any TIMESTAMP column definition can have any combination of DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses. In addition, these clauses now can be used with DATETIME column definitions. For more information, see Automatic Initialization and Updating for TIMESTAMP and DATETIME.

Sign In or Register to comment.