FEATURE: add string id for action log types.
This string ID will be used in each logger for better readability (we will use string identifier except the "magical" integer constant)
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddStringIdForActionTypes extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('action_log_types', function (Blueprint $table) {
|
||||
$table->string('string_id', 64)
|
||||
->after('id')
|
||||
->unique()->comment = 'String ID used for better readability in loggers';
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('action_log_types', function (Blueprint $table) {
|
||||
$table->dropColumn('string_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user