Add audit logs for rules.

This commit is contained in:
James Cole
2022-10-02 05:37:38 +02:00
parent 681b0b9046
commit 185842a891
7 changed files with 211 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
<?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('audit_log_entries', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->softDeletes();
$table->integer('auditable_id', false, true);
$table->string('auditable_type');
$table->integer('changer_id', false, true);
$table->string('changer_type');
$table->string('action', 255);
$table->text('before')->nullable();
$table->text('after')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('audit_log_entries');
}
};