File "2016_09_30_140757_create_audit_table.php"

Full path: /home/qooetu/costes.qooetu.com/database/migrations/2016_09_30_140757_create_audit_table.php
File size: 1016 B (1016 B bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAuditTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
         Schema::create('audit_trail', function ($table) {
            $table->increments('id');
            $table->integer('user_id')->nullable();
            $table->string('owner_type');
            $table->integer('owner_id')->nullable();
            $table->text('old_value')->nullable();
            $table->text('new_value')->nullable();
            $table->string('type');
            $table->string('route')->nullable();
            $table->string('ip')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */

    
    public function down()
    {
        Schema::dropIfExists('audit_trail');
    }
}