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

Specify InnoDB as default table type #1661

Closed
tobyzerner opened this issue Nov 29, 2018 · 3 comments
Closed

Specify InnoDB as default table type #1661

tobyzerner opened this issue Nov 29, 2018 · 3 comments

Comments

@tobyzerner
Copy link
Contributor

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?

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

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

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

@franzliedke
Copy link
Contributor

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
Copy link
Contributor

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.

wzdiyb pushed a commit to wzdiyb/core that referenced this issue Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants