Skip to content

Commit

Permalink
pgsql check missed in ModifyUsersTable
Browse files Browse the repository at this point in the history
  • Loading branch information
DrzikFilip committed Dec 10, 2018
1 parent da5594f commit 0e1eb92
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions install-stubs/database/migrations/modify_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ public function down()
$table->dropColumn('language');
});

Schema::table('users', function (Blueprint $table) {
$table->dropIndex('users_email_null_deleted_at');
});
$connection = config('database.default');
$driver = config("database.connections.{$connection}.driver");
if($driver == 'pgsql') {
Schema::table('users', function (Blueprint $table) {
$table->dropIndex('users_email_null_deleted_at');
});
}

Schema::table('users', function (Blueprint $table) {
$table->dropUnique(['email', 'deleted_at']);
Expand Down

0 comments on commit 0e1eb92

Please sign in to comment.