Update audit design

This commit is contained in:
Dane Everitt 2021-01-17 11:52:44 -08:00
parent ccecaa6694
commit 291c65275a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 16 additions and 15 deletions

View file

@ -17,12 +17,16 @@ class CreateAuditLogsTable extends Migration
$table->id();
$table->char('uuid', 36);
$table->boolean('is_system')->default(false);
$table->bigInteger('user_id')->nullable();
$table->bigInteger('server_id')->nullable();
$table->unsignedInteger('user_id')->nullable();
$table->unsignedInteger('server_id')->nullable();
$table->string('action');
$table->string('subaction')->nullable();
$table->json('device');
$table->json('metadata');
$table->timestamp('created_at', 0);
$table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
$table->foreign('server_id')->references('id')->on('servers')->onDelete('cascade');
});
}