2019_08_28_221247_create_user_bike_operate.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateUserBikeOperate extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('user_bike_operates', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name');
  17. $table->tinyInteger('type')->default(0)->comment('类型');
  18. $table->string('bike_no', 30)->comment('车的编号');
  19. $table->double('latitude', 10, 7)->nullable()->comment('维度');
  20. $table->double('longitude', 10, 7)->nullable()->comment('经度');
  21. $table->bigInteger('user_id')->default(0)->comment('用户id');
  22. $table->tinyInteger('status')->default(1);
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('user_bike_operates');
  34. }
  35. }