| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?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->string('title')->nullable()->index()->comment('标题');
- $table->text('content')->nullable()->comment('内容');
- $table->tinyInteger('status')->comment('状态');
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('requirements');
- }
- }
|