-
-
Notifications
You must be signed in to change notification settings - Fork 346
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 database setup fails (invalid default timestamp value) #131
Comments
Hi, @bunsenmcdubbs , that's a nice bug... Mysql must be doing some quite strange interpretation of it's own rules as I don't understand how we can violate the NO_ZERO_DATE setting if we don't specify a default value... As you may see, we are testing against mysql 5.5 on travis, so this is the preferred version, I'll try to add newer mysql version in the test matrix before trying to track down the bug. Obviously, any pull requests are accepted :) |
I just did a bit more testing/playing around with the
^from documentation This manifests itself in the
^ also applies to NO_ZERO_IN_DATE This means that for <= 5.7.x versions of MySQL, removing or keeping the two flags disabled will keep this issue from appearing. For future (5.7+) versions, stay off of strict mode. They are enabled in the default settings on my version of MySQL (setting them with
to the beginning of the sql script. Is it ok to paint with such a broad brush? (I retrieved all the active default settings and then removed only the two relevant modes). NOTE: I did this and it works (finishes the V1 script but now I'm running into (and fixing) syntax issues in other setup scripts). Out of curiosity @syjer: can you run |
@bunsenmcdubbs ouch, mysql is really quirky :/ I'm wondering if simply adding a single timestamp column and then making an alter table statement for adding the second one would do the trick? About
|
finally I was able to add mysql 5.6 to the test matrix! the output is:
|
Possible fix@syjer Creating the table with one timestamp column and then altering it does not work (same error). If there aren't any settings that we need especially, we can just have
at the beginning of the migration script to mitigate this Other SQL issuesI'm currently running into other issues with the migration script
I assume this is an issue with MySQL v5.7 again? (I'm looking into it more right now) |
@bunsenmcdubbs your working copy (or your fork) is outdated, see e9e2878 V15_1.8.2__ALTER_TICKET_FIELD_CONF.sql should run now... |
Oh ok thanks! I'll check it out tonight (~10 hours from now). (As long as I On Tue, Jun 28, 2016 at 1:57 AM, Celestino Bellone <[email protected]
Best Wishes, |
merged, thanks! |
The
V1_INITIAL_VERSION.sql
script fails when it tries to create thealfio.event
table. Specifically it fails becauseend_ts
's does not have a valid default value.I am running MySQL v5.7.9 on Mac and do not have any custom settings for MySQL (all defaults).
I think the MySQL timestamp documentation and their notes on
NO_ZERO_DATE
might be relevant but I'm not sure... because 5.7.9 seems to have deprecated theNO_ZERO_DATE
setting. What is the intended/preferred behavior here?alfio.log
The text was updated successfully, but these errors were encountered: