Page MenuHomePhorge

2023_06_06_100000_create_eventlog_table.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

2023_06_06_100000_create_eventlog_table.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.
*
* @return void
*/
public function up()
{
Schema::create(
'eventlog',
function (Blueprint $table) {
$table->string('id', 36)->primary();
$table->string('object_id', 36);
$table->string('object_type', 36);
$table->tinyInteger('type')->unsigned();
$table->string('user_email')->nullable();
$table->string('comment', 1024)->nullable();
$table->text('data')->nullable(); // json
$table->timestamp('created_at')->useCurrent();
$table->index(['object_id', 'object_type', 'type']);
$table->index('created_at');
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('eventlog');
}
};

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 2:21 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18849469
Default Alt Text
2023_06_06_100000_create_eventlog_table.php (1 KB)

Event Timeline