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:
Michal Kváček
2016-01-28 22:42:06 +01:00
parent 0c7a138e43
commit 26873a2db4
@@ -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');
});
}
}