mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 00:21:05 +03:30
39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateInputValuesTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('input_values', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->string('value');
|
|
$table->unsignedBigInteger('input_id');
|
|
$table->foreign('input_id')->references('id')->on('inputs');
|
|
$table->unsignedBigInteger('test_result_id');
|
|
$table->foreign('test_result_id')->references('id')->on('test_results');
|
|
$table->unsignedBigInteger('option_id');
|
|
$table->foreign('option_id')->references('id')->on('options');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('input_values');
|
|
}
|
|
}
|