1
0
mirror of https://github.com/flarum/core.git synced 2025-02-24 11:13:40 +01:00

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 57f73c9638
commit fb6b51b1cf
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
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);
});