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

Specify InnoDB as default table type #1661

Closed
tobscure opened this Issue Nov 29, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@tobscure
Member

tobscure commented Nov 29, 2018

Since we now use foreign keys, we need to be explicit about wanting tables to be created using the InnoDB engine. MySQL can default to MyISAM in some circumstances, causing errors like this.

Probably the best approach is to set engine in the database config that's passed to Laravel. We probably wouldn't want this in config.php though. Alternatively we could just set the engine in the migrations where we create tables?

@tobscure tobscure added the type/bug label Nov 29, 2018

@franzliedke franzliedke added this to the 0.1.0-beta.8.1 milestone Nov 29, 2018

@franzliedke

This comment has been minimized.

Member

franzliedke commented Nov 29, 2018

We probably wouldn't want this in config.php though.

With that you mean it shouldn't be configurable, right?

@franzliedke

This comment has been minimized.

Member

franzliedke commented Nov 29, 2018

Setting engine in the DB config works for new installations. For old ones, we'll have to add a new migration that converts to InnoDB if necessary. Agreed?

franzliedke added a commit that referenced this issue Nov 29, 2018

@franzliedke

This comment has been minimized.

Member

franzliedke commented Nov 29, 2018

Okay, I took care of the defaults.

Re-reading the linked discussion, we will probably not need a migration, as the error happened during fresh installation, and simply running the beta.7 -> beta.8 migrations already won't work.

So I am closing this.

If somebody has a beta.7 forum with MyISAM tables, they will have to manually change the engine to InnoDB prior to upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment