Refactor IP History

This commit is contained in:
xiaomlove
2025-10-14 14:54:44 +07:00
parent 0f172a94be
commit ba8715a3f9
34 changed files with 494 additions and 131 deletions

View File

@@ -0,0 +1,30 @@
<?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('iplog', function (Blueprint $table) {
$table->string('uri')->nullable();
$table->integer('count')->default(0);
$table->index('ip');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('iplog', function (Blueprint $table) {
$table->dropColumn(['uri', 'count']);
});
}
};