12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateAccountLogsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('account_logs', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->bigInteger('user_id')->unsigned()->index();
- $table->bigInteger('item_id')->unsigned()->nullable();
- $table->string('item_type')->nullable();
- $table->string('action')->nullable();
- $table->string('message')->nullable();
- $table->string('link')->nullable();
- $table->string('ip_address')->nullable();
- $table->string('user_agent')->nullable();
- $table->json('metadata')->nullable();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('account_logs');
- }
- }
|