diff --git a/database/migrations/2026_10_13_000003_add_two_factor_to_customers.php b/database/migrations/2026_10_13_000003_add_two_factor_to_customers.php index cccdb11..36adc6f 100644 --- a/database/migrations/2026_10_13_000003_add_two_factor_to_customers.php +++ b/database/migrations/2026_10_13_000003_add_two_factor_to_customers.php @@ -7,9 +7,11 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up(): void { - Schema::table('customers', function (Blueprint $table) { - $table->boolean('two_factor_enabled')->default(false); - }); + if (! Schema::hasColumn('customers', 'two_factor_enabled')) { + Schema::table('customers', function (Blueprint $table) { + $table->boolean('two_factor_enabled')->default(false); + }); + } Schema::create('customer_trusted_devices', function (Blueprint $table) { $table->id(); @@ -18,7 +20,7 @@ return new class extends Migration { $table->string('user_agent', 255)->nullable(); $table->string('ip_address', 45)->nullable(); $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->index(); + $table->dateTime('expires_at')->index(); $table->timestamps(); }); }