Skip to content

Commit 1c5078e

Browse files
Update 2021_05_28_121021_add_index_key_people_table.php
1 parent 3543937 commit 1c5078e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/migrations/2021_05_28_121021_add_index_key_people_table.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ class AddIndexKeyPeopleTable extends Migration
1313
*/
1414
public function up()
1515
{
16+
if (Schema::hasColumn('people', 'uid'))
17+
1618
Schema::table('people', function (Blueprint $table) {
17-
if (Schema::hasColumn('people', 'uid'))
1819
{
1920
$table->index(['id', 'uid']);
20-
}
21+
2122
});
2223

2324
}
25+
}
2426

2527
/**
2628
* Reverse the migrations.

0 commit comments

Comments
 (0)