-
-
Notifications
You must be signed in to change notification settings - Fork 841
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
Something went wrong: SQLSTATE[HY000] - MySQL: 5.7.23 #1675
Comments
@franzliedke can you please look at this in relation to fb6b51b? |
@tobscure its correct but tags is a separate extension and creates the tables as MyISAM, I proble flarum / core as dev-master and it did not work just those two tables (tags, migrations) all the others are like innodb. |
The changes in fb6b51b should theoretically force InnoDB to be used for all tables, including those created by extensions, and the migrations table. Are you experiencing this on a totally fresh install of dev-master? |
If a completely new installation of zero, is correct using flarum/core dev-master |
I'm having the same issues on a fresh install. Even with the changes from fb6b51b my migrations and tags are created as MyISAM. |
Ah, I'd figured it would be something like this. However, fb6b51b also sets InnoDB as engine for every table created through |
I guess we could also add the explicit schema to the |
@franzliedke If we have properly set the default engine in the config then we shouldn't need to define it explicitly in the schema at all. Remember by adding the "InnoDB" line to our migrations we are automatically making them MySQL-only. |
I agree with @tobscure ; adding enforcement in different locations might only complicate trouble shooting in the future. |
As argued in #1675, this makes us slightly less reliant on MySQL.
I agree with the reasoning about being MySQL-specific, and I have reverted all changes that set InnoDB explicitly for table creation statements. That said, there is at least one existing migration where we explicitly set the engine, and some code (e.g. fulltext search) is very MySQL-specific, so I am not entirely sure that we will ever be able to seamlessly enable other DB engines. |
I guess it's related, but when I try to run
I guess the issue is not solved ? |
@marcteys Marc please create a new issue and add the information we ask you there, amongst others the php flarum info output. Thank you. |
The installer doesn't use DatabaseServiceProvider, so we need to set the default engine in the config here too. Fixes flarum#1675
As argued in flarum#1675, this makes us slightly less reliant on MySQL.
hi, installed flarum branch dev-master,
Something went wrong: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table
tag_useradd constraint
tag_user_tag_id_foreignforeign key (
tag_id) references
tags(
id) on delete cascade)
The problem tables:
The rest od tables if you create in Innodb.
Environment
The text was updated successfully, but these errors were encountered: