pelican-panel-banquise/database/migrations/2025_07_22_091435_update_users_totp.php
Boy132 d5d50d4150
Collection of smaller v4 fixes (#1684)
Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com>
Co-authored-by: notCharles <charles@pelican.dev>
2025-09-15 23:28:57 +02:00

37 lines
907 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->text('mfa_app_secret')->nullable();
$table->text('mfa_app_recovery_codes')->nullable();
$table->boolean('mfa_email_enabled')->default(false);
});
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('use_totp');
$table->dropColumn('totp_secret');
$table->dropColumn('totp_authenticated_at');
});
Schema::dropIfExists('recovery_tokens');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Not needed
}
};