You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 lines
1.5 KiB

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateActivitiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('activities', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('business_id');
$table->unsignedBigInteger('project_id')->nullable();
$table->unsignedBigInteger('system_id')->nullable();
$table->unsignedBigInteger('workflow_id')->nullable();
$table->unsignedBigInteger('status_id')->nullable();
$table->unsignedBigInteger('sprint_id')->nullable();
$table->unsignedBigInteger('task_id')->nullable();
$table->unsignedBigInteger('subject_id')->nullable();//row id
$table->unsignedBigInteger('actor_id');
$table->unsignedBigInteger('user_id')->nullable();
$table->unsignedBigInteger('crud_id')->nullable();
$table->unsignedBigInteger('table_id')->nullable();
$table->json('original')->nullable(); // a unique identifier that represent the type of action
$table->json('diff')->nullable(); // all data that has been changed
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('activities');
}
}