Skip to content

Commit

Permalink
Set InnoDB for DB connection and new tables
Browse files Browse the repository at this point in the history
Refs #1661.
  • Loading branch information
franzliedke committed Nov 29, 2018
1 parent 57f73c9 commit fb6b51b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Database/DatabaseServiceProvider.php
Expand Up @@ -25,6 +25,8 @@ public function register()
$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'));

Expand Down
1 change: 1 addition & 0 deletions src/Database/Migration.php
Expand Up @@ -31,6 +31,7 @@ public static function createTable($name, callable $definition)
'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);
});
Expand Down

0 comments on commit fb6b51b

Please sign in to comment.