1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateLocationLogsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('location_logs', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->string('bike_no', 50)->comment('车辆编号');
- $table->string('box_no', 50)->comment('控制设备编号');
- $table->bigInteger('bike_id')->default(0)->comment('车id');
- $table->bigInteger('area_id')->default(0)->comment('区域id');
- $table->float('latitude', 10, 7)->default(0.00)->comment('维度');
- $table->float('longitude', 10, 7)->default(0.00)->comment('经度');
- $table->tinyInteger('battery_power')->default(0)->comment('电量');
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('location_logs');
- }
- }
|