File "2013_04_09_062329_create_revissions_table.php"

Full Path: /home/isoftco/public_html/hrm/database/migrations/2013_04_09_062329_create_revissions_table.php
File size: 861 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

use Illuminate\Database\Migrations\Migration;

class CreateRevissionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('revisions', function ($table) {
            $table->increments('id');
            $table->string('revisionable_type');
            $table->integer('revisionable_id');
            $table->integer('user_id')->nullable();
            $table->string('key');
            $table->text('old_value')->nullable();
            $table->text('new_value')->nullable();
            $table->timestamps();

            $table->index(array('revisionable_id', 'revisionable_type'));
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('revisions');
    }
}