Add StatusView model to store views for discover algorithm

This commit is contained in:
Daniel Supernault 2020-12-26 20:16:35 -07:00
parent ea0c1e80c6
commit 7a68ee948a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStatusViewsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('status_views', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('status_id')->unsigned()->nullable()->index();
$table->bigInteger('status_profile_id')->unsigned()->nullable()->index();
$table->bigInteger('profile_id')->unsigned()->nullable()->index();
$table->unique(['status_id', 'profile_id']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('status_views');
}
}