dreamfactorysoftware / dreamfactory

DreamFactory API Management Platform
https://www.dreamfactory.com
Apache License 2.0
1.56k stars 314 forks source link

[MySQL] Database tables are always created using the default engine of the server #146

Open jgerken opened 7 years ago

jgerken commented 7 years ago

DreamFactory requires MySQL tables to use the InnoDB engine:

Older versions of MySQL default to using the MyISAM engine. This engine does not support foreign key relationships and is thus not compatible with DreamFactory. (from the DreamFactory wiki)

However, the system always uses the default engine of the server instead of forcing the InnoDB engine for its tables.

I installed DreamFactory in a shared hosting environment where I have no control over the MySQL server. The default engine is set to MyISAM for the MySQL server. The setup of the application completed without any errors but it failed at runtime with an internal server error. Initially the cause of the error was not shown nor logged - DreamFactory simply showed a blank page. It would be nice if the app could handle the error a bit gracefully and show an error message to the user.

I have created a pull request to force the InnoDB engine when the tables in a MySQL database are created.

drewpearce commented 7 years ago

Thanks for the PR! I'll ask someone to have a look.