<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSurveyQuestionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('survey_questions', function (Blueprint $table) {
$table->increments('id');
$table->integer('template_id')->index()->unsigned();
$table->text('title');
$table->boolean('required')->nullable();
$table->boolean('multiple_select')->nullable();
$table->enum('question_type', array('1', '2'))->index()->default('1');
$table->integer('order')->unsigned()->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('survey_questions');
}
}