parent
0fe0f750c4
commit
af68dbed8f
4 changed files with 172 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class BuildApiLogTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('api_logs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->boolean('authorized');
|
||||
$table->char('key', 16)->nullable();
|
||||
$table->char('method', 6);
|
||||
$table->text('route');
|
||||
$table->text('content')->nullable();
|
||||
$table->text('user_agent');
|
||||
$table->ipAddress('request_ip');
|
||||
$table->timestampsTz();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('api_logs');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue