1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateTroubleTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('troubles', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->bigInteger('user_id')->default(0)->comment('用户id');
- $table->bigInteger('bike_id')->default(0)->comment('车id');
- $table->bigInteger('area_id')->default(0)->comment('区域id');
- $table->string('trouble_part', 30)->nullable()->comment('故障部位');
- $table->string('trouble_imgs')->nullable()->comment('故障图片');
- $table->text('trouble_description')->nullable()->comment('故障描述');
- $table->tinyInteger('up_trouble_type')->default(0)->comment('问题类型');
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('troubles');
- }
- }
|