database/migrations/2021_08_29_083603_create_marks_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMarksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('marks', function (Blueprint $table) {
$table->id();
$table->float('marks')->default(0);
$table->unsignedInteger('student_id');
$table->unsignedInteger('class_id');
$table->unsignedInteger('section_id');
$table->unsignedInteger('course_id');
$table->unsignedInteger('exam_id');
$table->unsignedInteger('session_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('marks');
}
}