Skip to content

Commit a20e803

Browse files
Changed migration of users table (#586)
* Changed migration of users table * Update 2014_10_12_200000_add_two_factor_columns_to_users_table.php Removed unused use statement
1 parent 48fb1eb commit a20e803

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use Illuminate\Database\Migrations\Migration;
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
6-
use Laravel\Fortify\Fortify;
76

87
return new class extends Migration
98
{
@@ -21,11 +20,9 @@ public function up(): void
2120
->after('two_factor_secret')
2221
->nullable();
2322

24-
if (Fortify::confirmsTwoFactorAuthentication()) {
25-
$table->timestamp('two_factor_confirmed_at')
26-
->after('two_factor_recovery_codes')
27-
->nullable();
28-
}
23+
$table->timestamp('two_factor_confirmed_at')
24+
->after('two_factor_recovery_codes')
25+
->nullable();
2926
});
3027
}
3128

@@ -35,12 +32,11 @@ public function up(): void
3532
public function down(): void
3633
{
3734
Schema::table('users', function (Blueprint $table) {
38-
$table->dropColumn(array_merge([
35+
$table->dropColumn([
3936
'two_factor_secret',
4037
'two_factor_recovery_codes',
41-
], Fortify::confirmsTwoFactorAuthentication() ? [
4238
'two_factor_confirmed_at',
43-
] : []));
39+
]);
4440
});
4541
}
4642
};

0 commit comments

Comments
 (0)