pixelfed/database/migrations/2018_09_11_202435_create_activities_table.php

37 lines
896 B
PHP
Raw Permalink Normal View History

2018-09-12 00:47:25 +00:00
<?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');
}
}