Skip to content

Commit 146e4f9

Browse files
committed
Only drop two_factor_confirmed_at column if it exists in the table
Avoid regression bug from #586 Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent a20e803 commit 146e4f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ public function up(): void
3232
public function down(): void
3333
{
3434
Schema::table('users', function (Blueprint $table) {
35-
$table->dropColumn([
35+
$table->dropColumn(array_filter([
3636
'two_factor_secret',
3737
'two_factor_recovery_codes',
38-
'two_factor_confirmed_at',
39-
]);
38+
Schema::hasColumn('users', 'two_factor_confirmed_at') ? 'two_factor_confirmed_at' : null,
39+
]));
4040
});
4141
}
4242
};

0 commit comments

Comments
 (0)