mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-24 19:25:27 +00:00
37 lines
800 B
PHP
37 lines
800 B
PHP
<?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');
|
|
}
|
|
}
|