Updated hard-coded string lengths for indexed columns

Since this is what's causing issues for people during migration due to max
key lengths.
Related to #2710.
This commit is contained in:
Dan Brown 2021-04-27 20:53:22 +01:00
parent f8cdd6e80d
commit c4e31a0d5e
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
4 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ class CreateSearchIndexTable extends Migration
{
Schema::create('search_terms', function (Blueprint $table) {
$table->increments('id');
$table->string('term', 200);
$table->string('term', 180);
$table->string('entity_type', 100);
$table->integer('entity_id');
$table->integer('score');

View File

@ -14,7 +14,7 @@ class AddRoleExternalAuthId extends Migration
public function up()
{
Schema::table('roles', function (Blueprint $table) {
$table->string('external_auth_id', 200)->default('');
$table->string('external_auth_id', 180)->default('');
$table->index('external_auth_id');
});
}

View File

@ -37,8 +37,8 @@ class CreateBookshelvesTable extends Migration
Schema::create('bookshelves', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 200);
$table->string('slug', 200);
$table->string('name', 180);
$table->string('slug', 180);
$table->text('description');
$table->integer('created_by')->nullable()->default(null);
$table->integer('updated_by')->nullable()->default(null);

View File

@ -15,7 +15,7 @@ class AddUserSlug extends Migration
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('slug', 250);
$table->string('slug', 180);
});
$slugMap = [];