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

SQL schema error #1

Closed
gwillem opened this issue Aug 14, 2019 · 5 comments
Closed

SQL schema error #1

gwillem opened this issue Aug 14, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@gwillem
Copy link

gwillem commented Aug 14, 2019

Thanks for making this extension!

However, once FreeFlarum users enable it in the admin panel:

[2019-08-14 12:47:45] production.ERROR: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null' at line 1 in /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:61
Stack trace:
#0 /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(61): PDO->prepare('alter table `us...', Array)

Running MariaDB 1:10.1.41-0ubuntu0.18.04.1

Edit: on the forum I read that it would be resolved by upgrading MariaDB. However, I am not keen on backporting MariaDB because a) it may produce other issues and b) I would then be responsible for tracking security issues, which are otherwise handled by the Ubuntu LTS team. So hopefully there is a fix, similar to the fix that was applied to fof/ban-ips?

@Ralkage
Copy link
Contributor

Ralkage commented Sep 27, 2019

@gwillem most certainly! We’ll put it on our to-do and keep you posted :D

@Ralkage
Copy link
Contributor

Ralkage commented Sep 29, 2019

Hi @gwillem, looks as if the JSON datatype is not supported in MariaDB versions below 10.2.7, the JSON datatype support was added in 10.2.7. We would either have to change the logic around a bit which may take some time or just put an indicator in the README that user's may experience issues in older versions of MariaDB.

We could always do the same approach used in the user_preferences column in the users table migration in Flarum core which is to store the JSON data in a BLOB. Referencing this migration column of course :)

I'll discuss with the team and come up with a fix!

@Ralkage Ralkage added the bug Something isn't working label Sep 29, 2019
@Ralkage
Copy link
Contributor

Ralkage commented Sep 29, 2019

@gwillem and @xCustomWorld this has been fixed 👍

@SKevo18
Copy link

SKevo18 commented Sep 29, 2019

Thank you!

@gwillem
Copy link
Author

gwillem commented Sep 30, 2019

Awesome work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants