Set InnoDB for DB connection and new tables

Refs #1661.
This commit is contained in:
Franz Liedke 2018-11-29 23:21:58 +01:00
parent 7092b3bfff
commit d6632c061d
2 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,8 @@ class DatabaseServiceProvider extends AbstractServiceProvider
$this->app->singleton('flarum.db', function () {
$factory = new ConnectionFactory($this->app);
$dbConfig = $this->app->config('database');
$dbConfig['engine'] = 'InnoDB';
$connection = $factory->make($this->app->config('database'));
$connection->setEventDispatcher($this->app->make('Illuminate\Contracts\Events\Dispatcher'));

View File

@ -31,6 +31,7 @@ abstract class Migration
'up' => function (Builder $schema) use ($name, $definition) {
$schema->create($name, function (Blueprint $table) use ($schema, $definition) {
$definition($table);
$table->engine = 'InnoDB';
static::fixIndexNames($schema, $table);
});