12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateQuestionsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('questions', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name', 60)->comment('题目名称');
- $table->string('options', 60)->comment('题目选项');
- $table->string('answers', 60)->comment('题目答案');
- $table->boolean('radio')->comment("是否单选");
- $table->string('type', 60)->comment('题目类型');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('questions');
- }
- }
|