Skip to content

Commit

Permalink
wording
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 26, 2017
1 parent 9d348f3 commit 18796f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,9 @@ Command | Description
`$table->unique(['first', 'last']);` | Add a composite unique index.
`$table->index('state');` | Add a basic index.

#### Index Lengths & MySQL/MariaDB
#### Index Lengths & MySQL / MariaDB

Laravel uses the `utf8mb4` character set by default, which includes support for storing "emojis" in the database. If you are running a version of MySQL older than the 5.7.7 release or a version of MariaDB older than the 10.2.2 release, you may need to manually configure the default string length generated by migrations in order for MySQL to create indexes for them. You may configure this by calling the `Schema::defaultStringLength` method within your `AppServiceProvider`:
Laravel uses the `utf8mb4` character set by default, which includes support for storing "emojis" in the database. If you are running a version of MySQL older than the 5.7.7 release or MariaDB older than the 10.2.2 release, you may need to manually configure the default string length generated by migrations in order for MySQL to create indexes for them. You may configure this by calling the `Schema::defaultStringLength` method within your `AppServiceProvider`:

use Illuminate\Support\Facades\Schema;

Expand All @@ -375,7 +375,7 @@ Laravel uses the `utf8mb4` character set by default, which includes support for
Schema::defaultStringLength(191);
}

Another solution for this problem is using the `innodb_large_prefix` option, check your RDBMS manual for instructions on how to properly enable it.
Alternatively, you may enable the `innodb_large_prefix` option for your database. Refer to your database's documentation for instructions on how to properly enable this option.

<a name="dropping-indexes"></a>
### Dropping Indexes
Expand Down

0 comments on commit 18796f2

Please sign in to comment.