mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Add AccountLog model/migration
This commit is contained in:
parent
9fdce89526
commit
bac7e05d6f
2 changed files with 41 additions and 1 deletions
|
@ -4,7 +4,7 @@ namespace App;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class Report extends Model
|
class AccountLog extends Model
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue