-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation fails with "Invalid default value for 'accounts_modified_date'" #32
Comments
Hmm yes, that command works for me locally so I think it must be a mysql change - can you confirm your mysql version (I'm not going to dig on this too much right now but that is good info to have) |
Just adding this link https://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html (which seems to say you are wrong & it does work :-) but I have only really skimmed it |
Running the
https://gist.github.com/totten/c51f424b848aa67dfc025e2b0940d7ff#file-system-get-json-L384 It seems there's a configuration option That page says:
|
@eileenmcnaughton I get a related issue when upgrading from 554586f to 5bae5ac
It seems to be related to my SQL version and the sql_mode. My MySQL version is 5.7.23. Here's how I worked around this issue ... During the upgrade, when I get notification of the error, I continue the upgrade by skipping this step, as the other steps don't fail without it. Then I do the following in a MySQL client ...
(@totten suggested NO_ZERO_DATE but that is now deprecated in favour of STRICT_TRANS_TABLES) |
@eileenmcnaughton the use of zero dates seems to becoming a bit flaky. What do you think of replacing the test of
with
throughout the code? The accounts_modified_date could then just default to NULL. For invoices this seems straightforward as we get both the status and the modified date from Xero. For contacts we'd need to add some logic to set account_status_id = 1 (say) when we get data from Xero. |
I could only get this to work by editing the auto_install.sql file to set the date fields to NULL MySQL Server version: 5.7.25-0ubuntu0.16.04.2 - (Ubuntu) |
@eileenmcnaughton Could be to do with MySQL settings - I was also getting errors from contributions, which stopped occurring after removing NO_ZERO_IN_DATE, NO_ZERO_DATE from my.cnf, after reading this https://issues.civicrm.org/jira/browse/VOL-299 I suspect if I was to do a fresh installation it may also resolve this issue. |
Confirmed - changing the sql-mode configuration as per below enabled an error free installation: |
I think this can be closed? |
@mattwire should I maybe remove that default? It feels like it is not really correct & perhaps defaulting to NULL would be more correct? |
I was trying to reproduce an unrelated issue where the JIRA report incidentally involved this extension, so I installed it. The installation crashes on this error. It might be a MySQL 5.7 issue.
The text was updated successfully, but these errors were encountered: