2015-08-16 19:59:23 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2021-06-26 17:23:15 +02:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
2015-08-16 19:59:23 +02:00
|
|
|
|
|
|
|
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');
|
2016-02-16 22:25:11 +01:00
|
|
|
$table->nullableTimestamps();
|
2015-08-16 19:59:23 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::drop('activities');
|
|
|
|
}
|
|
|
|
}
|