-
Notifications
You must be signed in to change notification settings - Fork 573
Sql error after fresh install #1215
Comments
Ok, after some digging, (and a more extensive reading of the current open issues) DATETIME DEFAULT CURRENT_TIMESTAMP ... is only available in MySQL 5.6+. Somebody needs to update the Docs https://anchorcms.com/docs because it says MySQL 5.2+ is required. Worked fine after upgrading the mysql package. (Updated to mysql-5.7-5.7.18) |
Thanks for the spot! We do have this in our new documentation https://docs.anchorcms.com/ but it looks like the redirect isn't working. @rwarasaurus could you look into this? |
This is a duplicate of #1205. Would've saved some time for you if you had searched the issues on GH like the guidelines ask. 😖 This has been fixed within the repo, however I understand it's slightly misleading for the two documentation pages to have conflicting information. I guess once @rwarasaurus jumps on to fix it, this'll stay open. |
Regarding the fix in the repo: Current documentation, https://docs.anchorcms.com/ and https://anchorcms.com/docs doesn't reflect this. |
@Wewannado thanks for pointing this out! Shame its such a specific version for usage, any way we can easily make this compatible with the main 5.6 ver? |
@Wewannado Wowee. What was I thinking writing an issue for an incompatible MySQL version, but then apply a patch which bumps the PHP req. 😅 Cheers for pointing that out to me! I'll reopen the initial issue, and apply an actual fix for it as soon as I can, using the |
@Wewannado , @TheBrenny , @daviddarnes : this is still an issue. This says 5.2, but is not working with my 5.5. https://anchorcms.com/docs/getting-started/requirements |
It only works with MySQL 5.6+ althought it's not yet reflected in the homepage. Writing a fix for versions 5.5 or older would be too troublesome, so, because most servers should actually been using the updated versions of MySQL, It was chosen to bump the MySQL version to 5.6 |
We've updated the requirements to reflect what the project supports and to keep in line with up to date software; MySQL 5.6 is now a min requirement. :) |
Summary
Did a fresh install
After install, when entering the site, I receive the error:
Database Error: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'updated'
SQL: ALTER TABLE
anchor_posts
ADD COLUMNupdated
DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTERcreated
The error has been logged in /anchor/errors.log
Expected Behaviour
Actual Behaviour
Context details (if applicable)
Server: Lighttp 1.4.35
PHP 5.6.30
Mysql: 5.5.55
The text was updated successfully, but these errors were encountered: