| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateRequirementsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('requirements', function (Blueprint $table) {
- $table->id();
- $table->integer('user_id')->comment('创建者');
- $table->decimal('score')->comment('');
- $table->timestamp('began_at')->nullable()->comment('任务开始时间');
- $table->timestamp('finished_at')->nullable()->comment('完结时间');
- $table->text('title')->nullable()->comment('标题');
- $table->text('content')->nullable()->comment('内容');
- $table->tinyInteger('status')->comment('状态');
- $table->softDeletes();
- $table->timestamps();
- $table->index(['title']);
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('requirements');
- }
- }
|