-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
MariaDB 10.2.7+ nullable date/time (Invalid default value for 'notifications_read_time') #1211
Comments
I can't reproduce this, with a slightly older MariaDB version. Can anybody else reproduce it? @KitsuneSolar Could you please post the output of |
@franzliedke in preparation of beta 7 I installed on the same Mariadb version, but didn't see this pop up. I'll take another look. |
Tested on
Lol good thing I decided to also upgrade PHP as a test. So most likely this is caused by the PHP 7.1 pdo mysql library. |
That's bizarre |
Also what strikes me as an obvious problem is the fact that the default value |
Oh I didn't even notice that! That would be the issue indeed. Can you confirm it is purely a PHP problem (does it work with php 7.1.7 + MySQL?) |
I thought that is the issue. And had hoped it's due to a bug in the specific version of doctrine/dbal etc. |
Brew is now installing mysql server. I'll let you know in a sec. |
PHP 7.1.7 + MySQL 5.7.19 works |
Also, error reproducible: |
@KitsuneSolar Again, please post the output of |
@franzliedke sorry.
|
Can you do |
Sorry, I do not know much about Composer. :(
|
Hmm, I tried it with v2.6.0 and it worked just fine for me. So it probably is related to MariaDB. |
I have same problem. small workaround, use with caution!
with:
|
@sijad working! |
This is not an issue with DBAL - we only support strings as default values. Do not use the workaround - correct the mapping instead. |
Also see doctrine/dbal#2804 (comment) |
@Ocramius Thanks for getting back to us here, but I don't understand what you are suggesting. There are two places where we reference this column, in column creation and renaming:
Also, the error happens only with certain versions of MariaDB / dbal, so I am unsure what we should be doing wrong there... |
Updated PHP. But error continues....
|
@KitsuneSolar Could you maybe try PHP 7.2 (beta), to see if the problem persists? If it does, then it may be a PHP bug. If not, then you can wait for PHP 7.2 to be released. |
@datitisev @KitsuneSolar as my research pointed out this is an issue specific to MariaDB 10.2.7+ |
@luceos I'm not sure what the problem is in mysql
Problem still exists. And most likely will continue. Error somewhere in the code. |
Can it be because of mysql strict mode? |
This is caused by new Column Schema enforced by MariaDB starting from version 10.2 and they are planing to enforce it as a standard in all upcoming versions, see https://jira.mariadb.org/browse/MDEV-13341 possible fix is in doctrine/dbal#2825 |
Having this problem too and it's quite annoying. |
@tenten8401 starting to share you opinion. 😁 My development has stalled due to this issue. Recently I had to reinstall Mariadb and couldn't easily add a new Flarum installation 😞 From what I've read we just have to wait for the PR @auviagroup mentioned to be merged and update asap. |
I am sort of in the same boat as you are and from the discussion above, it looks like a fix for this is being worked on here doctrine/dbal#2825 and this PR is part of 2.7 Milestone which is yet to be released. In short, release of 2.7 is what is required. Hope this helps! |
Indeed, we're waiting for the new DBAL release to be finished, until then there's not much we can do, I'm afraid. |
I've tried patching our migrations to make them work without 2.7. But that effort was pretty useless. I ended up moving back to MySQL for development 😊 |
Perhaps Flarum is more of a dev box project... For newer production environments, I know of no one using MySQL any more. Our Drupal 7, Drupal 8, and WordPress stacks are faster and more reliable on MariaDB, or Postgre.
We do have MySQL on our old servers, but they are all on their way to retirement.
I was hoping to use Flarum on a current WordPress site.
The environment is:
10.2.x MariaDB
7.1.x remi on CentOS 7.x
Do you know if any work is being done to correct the problem?
If so, I'd like to edit the Database instructions to include the details it lacks, including exactly what does and does not work, Character Set, and so on.
Stephen Grettenberg
Web Applications Specialist
Information Technology
University of Massachusetts, Amherst
[email protected]<http://[email protected]>
Life shrinks or expands in proportion to one's courage
- Anais Nin
We cannot solve our problems with the same thinking we used when we created them.
- Albert Einstein
What is a weed? A plant whose virtues have never been discovered.
- Ralph Waldo Emerson
…________________________________
From: Daniël Klabbers <[email protected]>
Sent: Monday, February 12, 2018 3:51:10 AM
To: flarum/core
Cc: Stephen Grettenberg; Comment
Subject: Re: [flarum/core] MariaDB 10.2.7+ nullable date/time (Invalid default value for 'notifications_read_time') (#1211)
I've tried patching our migrations to make them work without 2.7. But that effort was pretty useless. I ended up moving back to MySQL for development 😊
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1211 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Ae_dwFd9oRJIdcp6N3IJ-A10FekHRq1qks5tT_t-gaJpZM4OjKWS>.
|
@grettenberg I recently started using Flarum with MariaDB 10.1 with no issues at all. Although 10.2.x support is still isn't there and my production environment uses that version but considering the fact that everything (as of now) works smoothly with 10.1, I'd like to believe things will stay the way they are! However, the documentation still needs to specify support for MariaDB to make things clear! |
Again, we're waiting for the upstream release; until then, we should not advertise compatiblity with MariaDB. |
This is understood. However, the documentation should reflect that. The documentation for MySQL should reflect pertinent information like Character Set and/or Collate information, or that it should not be used, amongst other settings.
Usually, MariaDB is transparent as a sub for the older slower MySQL - so posting a warning makes sense as well.
Finally, maybe a timeline. MariaDB is used extensively in production environments. It is a deal breaker - I can toss a few programmers at a problem easily enough. I can't change the primary web database environment for all my webservers for one program that wants to use a dated product.
Stephen Grettenberg
Web Applications Specialist
Information Technology
University of Massachusetts, Amherst
[email protected]<http://[email protected]>
Life shrinks or expands in proportion to one's courage
- Anais Nin
We cannot solve our problems with the same thinking we used when we created them.
- Albert Einstein
What is a weed? A plant whose virtues have never been discovered.
- Ralph Waldo Emerson
…________________________________
From: Franz Liedke <[email protected]>
Sent: Tuesday, February 13, 2018 2:24:22 PM
To: flarum/core
Cc: Stephen Grettenberg; Mention
Subject: Re: [flarum/core] MariaDB 10.2.7+ nullable date/time (Invalid default value for 'notifications_read_time') (#1211)
Again, we're waiting for the upstream release; until then, we should not advertise compatiblity with MariaDB.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1211 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Ae_dwKGvLlm8-jKSVYeOiVBAdYRhsKYNks5tUeFjgaJpZM4OjKWS>.
|
@grettenberg Flarum is in beta. Currently everything in terms of code is fluctuating, as such keeping concise documentation is a humongous task to handle with the few dedicated staff members at hand. Feel free to assist these good folk by sending in the necessary PR's to clarify where necessary.
|
Server: Localhost via UNIX socket Reproduce the problem |
I just ran into this issue and fixed it as follows;
Upon installing I ran into the SAME issue in a Flarum extension install - the suspend one - so I performed the same trick there;
After this, installation worked. I realize that this is more of a workaround than an actual fix, so I will not be issuing a merge request or anything. Ultimately, the rename should "just work" and as stated above, this is a problem with DBal that will hopefully be fixed soon. Running MariaDB 10.2.7 btw! |
Version 2.7.0 (and 2.7.1) has been released. I believe this should fix the issue, haven't tested it out. Just throwing it out for anyone still tracking this issue and waiting for dependency to get fixed. |
@gboor you just saved my life! I've struggled this for 6 months now... Thank you! |
I confirm the latest Flarum is working on mariadb. |
@nobicycle thanks for checking I'll update our travis configuration to make sure we remain compliant or know immediately when that's no longer the case. https://github.com/flarum/core/tree/1211-mariadb-compatibility |
We should probably also add the minimum version constraint for doctrine/dbal, right? |
Minimum to dbal has to be set to 2.7.0 which demands php 7.1, CI is ready in PR without the constraint. @franzliedke another reason to increase our own minimum requirement. If we decide to do so it would open up the other discussion (again) of supporting Stratigility 3.x and Laravel 5.6. @flarum/core what to do? |
fixes #1211 As we've already upgraded our minimum requirement to 7.1 there's no current need to force a constraint on dbal 2.7+.
Worked with doctrine/dbal 2.7.0. Got passed the installation and faced with:
|
This update is needed to fix MariaDB compatibility. See #1211.
@jinjie Please try again with the latest dev-master. The line referenced in the error message does not even exist in the latest version. 😉 @luceos Just FYI, I just updated our |
@franzliedke yes possibly 👍 |
got the same issue on the latest version, |
@LadyGH the latest version being beta 7.1? The fix is for the upcoming beta 8. I'm going to lock this as enough has been said about MariaDB compatibility, it has been fixed in beta 8 (dev-master) and we have tests for mariadb now. If you experience a comparable issue after beta 8 has been released, please open a new issue and add the link to this issue in the description. |
Bug report
Getting this error when trying to install:
UPDATE: Adding
composer show
The text was updated successfully, but these errors were encountered: