Added activity history to to all entities. Fixes #12

This commit is contained in:
Dan Brown
2015-08-16 18:59:23 +01:00
parent 41eb2fb633
commit 5d9d096028
19 changed files with 673 additions and 251 deletions

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActivitiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('activities', function (Blueprint $table) {
$table->increments('id');
$table->string('key');
$table->text('extra');
$table->integer('book_id')->indexed();
$table->integer('user_id');
$table->integer('entity_id');
$table->string('entity_type');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('activities');
}
}