2021-06-05 09:26:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2023-01-05 17:01:42 +00:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
2021-06-05 09:26:32 +00:00
|
|
|
|
2023-01-05 17:03:31 +00:00
|
|
|
return new class extends Migration
|
2021-06-05 09:26:32 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::connection(config('activitylog.database_connection'))->create(config('activitylog.table_name'), function (Blueprint $table) {
|
|
|
|
$table->bigIncrements('id');
|
|
|
|
$table->string('log_name')->nullable();
|
|
|
|
$table->text('description');
|
|
|
|
$table->nullableUuidMorphs('subject', 'subject');
|
|
|
|
$table->nullableUuidMorphs('causer', 'causer');
|
|
|
|
$table->longText('properties')->nullable();
|
|
|
|
$table->timestamps();
|
|
|
|
$table->index('log_name');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::connection(config('activitylog.database_connection'))->dropIfExists(config('activitylog.table_name'));
|
|
|
|
}
|
2023-01-05 17:03:31 +00:00
|
|
|
};
|