File: /mnt/data/ghayatcom/ghayatcom-api/database/migrations/2022_01_06_201416_create_referal_details.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateReferalDetails extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('referal_details', function (Blueprint $table) {
$table->id();
$table->foreignId('appointment_id')->nullable()->constrained('appointments');
$table->tinyInteger('is_referal')->nullable();
$table->string('presenting_complaints');
$table->string('indications')->nullable();
$table->string('special_comments')->nullable();
$table->string('last_menstrual_period')->nullable();
$table->string('examinations')->nullable();
$table->string('specific_examinations')->nullable();
$table->string('other_examinations')->nullable();
$table->string('request_for')->nullable();
$table->string('additional_comments')->nullable();
$table->enum('status', [0, 1])->default('0')->comment('0=>draft, 1=>confirmed');
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrent();
$table->softDeletes();
$table->foreignId('created_by')->nullable()->constrained('users');
$table->foreignId('updated_by')->nullable()->constrained('users');
$table->foreignId('deleted_by')->nullable()->constrained('users');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('referal_details');
}
}