D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
forge
/
almahero.online
/
database
/
migrations
/
Filename :
2022_04_02_131147_create_answers_table.php
back
Copy
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('answers', function (Blueprint $table) { $table->id(); $table->bigInteger('user_id'); $table->bigInteger('exam_id'); $table->bigInteger('question_id'); $table->bigInteger('question_option_id'); $table->bigInteger('take_exam_id'); $table->mediumText('multiple_choice_answer')->nullable(); $table->string('is_correct', 10)->comment('yes, no'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('answers'); } };