<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('questions', function (Blueprint $table) {
            $table->id();
            $table->string('question')->nullable();
            $table->string('type')->nullable();
            $table->string('options')->nullable();
            $table->softDeletes();
            $table->timestamps();
        });
        DB::table('questions')->insert(
            array(
                [
                    'question' => 'Any Drug allergies',
                    'type' => 'text'
                ],
                [
                    'question' => 'Medications currently taking',
                    'type' => 'text'
                ],
                [
                    'question' => 'Current hormone replacement?',
                    'type' => 'text'
                ],
                [
                    'question' => 'Past hormone replacement therapy',
                    'type' => 'text'
                ],
                [
                    'question' => 'How much cigarettes or cigars you smoke per day',
                    'type' => 'text'
                ],
                [
                    'question' => 'How much alcoholic beverages you drink per week',
                    'type' => 'text'
                ],
                [
                    'question' => 'Heart disease',
                    'type' => 'text'
                ],
                [
                    'question' => 'Diabetes',
                    'type' => 'text'
                ]
            )
        );
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('questions');
    }
};
