123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateProblemsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('problems', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('type')->comment('类型');
- $table->text('problem')->comment('问题');
- $table->text('answer')->comment('回答');
- $table->integer('create_id')->comment('创建者ID');
- $table->integer('update_id')->comment('更新者ID');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('problems');
- }
- }
|