database/migrations/2021_06_23_082102_create_h5p_user_progress.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateH5pUserProgress extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('h5p_user_progress', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('topic_id');
$table->unsignedInteger('user_id');
$table->string('event');
$table->json('data');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('h5p_user_progress');
}
}