-
Notifications
You must be signed in to change notification settings - Fork 387
/
audits.stub
52 lines (49 loc) · 1.39 KB
/
audits.stub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* This file is part of the Laravel Auditing package.
*
* @author Antério Vieira <anteriovieira@gmail.com>
* @author Quetzy Garcia <quetzyg@altek.org>
* @author Raphael França <raphaelfrancabsb@gmail.com>
* @copyright 2015-2017
*
* For the full copyright and license information,
* please view the LICENSE.md file that was distributed
* with this source code.
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAuditsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('audits', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id')->nullable();
$table->string('event');
$table->morphs('auditable');
$table->text('old_values')->nullable();
$table->text('new_values')->nullable();
$table->text('url')->nullable();
$table->ipAddress('ip_address')->nullable();
$table->string('user_agent')->nullable();
$table->string('tags')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('audits');
}
}