pixelfed/database/migrations/2018_09_11_202435_create_ac...

37 lines
896 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
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->bigIncrements('id');
$table->bigInteger('to_id')->unsigned()->nullable();
$table->bigInteger('from_id')->unsigned()->nullable();
$table->string('object_type')->nullable();
$table->json('data')->nullable();
$table->timestamp('processed_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('activities');
}
}