Skip to content
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

MySQL schema is missing default value #1993

Closed
jesusch opened this issue Oct 16, 2019 · 4 comments · Fixed by jjethwa/icinga2#237
Closed

MySQL schema is missing default value #1993

jesusch opened this issue Oct 16, 2019 · 4 comments · Fixed by jjethwa/icinga2#237
Assignees
Labels
Milestone

Comments

@jesusch
Copy link

jesusch commented Oct 16, 2019

While trying to setup a fresh director database I go the following error:
ERROR 1067 (42000) at line 33: Invalid default value for 'change_time'
which is caused by this line:
https://github.com/Icinga/icingaweb2-module-director/blob/master/schema/mysql.sql#L41

In the according mysql schema upgrade you did introduce a default:

MODIFY change_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;

I've executed this on a mysql 5.6.10

@Thomas-Gelf
Copy link
Contributor

Thanks for reporting this, to me this looks like a bug in your MySQL version. We'll figure out how to work around this, what operating system (and version) are you using?

@Thomas-Gelf
Copy link
Contributor

Oh, sorry - now I see. You're right, the linked fix addressed only the migration and not the schema file itself. Will be fixed!

@Thomas-Gelf Thomas-Gelf self-assigned this Oct 16, 2019
@Thomas-Gelf Thomas-Gelf added this to the 1.7.2 milestone Oct 16, 2019
@Thomas-Gelf
Copy link
Contributor

This relates to #1840, the fix for v5.6 in 2fc79e1 misses director_activity_log.change_time. The fix involves no schema migration, therefore it qualifies for v1.7.2. Users upgrading from former versions are fine. New Director setups on old systems running MySQL v5.6 are affected.

@Thomas-Gelf
Copy link
Contributor

Fix has been pushed, thanks for reporting this.

neubi4 pushed a commit to neubi4/icingaweb2-module-director that referenced this issue Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants