This commit is contained in:
邓皓元 2020-01-08 11:08:50 +08:00
parent 9cf3c81d19
commit f662471faa
2 changed files with 41 additions and 1 deletions

View File

@ -26,9 +26,17 @@ class CreateVirtualDevicesTable extends Migration
$table->decimal('last_lon', 10, 6)->default(0.000000)->comment('最后访问经度');
$table->decimal('last_lat', 10, 6)->default(0.000000)->comment('最后访问纬度');
$table->string('last_location', 255)->default('')->comment('最后访问位置');
$table->tinyInteger("type")->unsigned()->default(0)->comment('平台类型 0:广电 1:车控宝 2:微科 3:省内交通厅 4:省外交通厅 5:北斗行');
$table->tinyInteger("type")->unsigned()->default(0)->comment('平台类型 0:广电 1:车控宝 2:微科 3:省内交通厅 4:省外交通厅 5:北斗行 99:虚拟设备');
$table->timestamps();
$table->unique(['unique_key']);
$table->tinyInteger("is_lock")->unsigned()->default(0)->comment('0:未锁住 1:锁住');
$table->tinyInteger("is_effective")->unsigned()->default(0)->comment('0:无效 1:有效');
$table->tinyInteger("is_match")->unsigned()->default(0)->comment('0:未匹配 1:匹配');
$table->string("cartype", 15)->default("")->comment('设备对应得车类型,0:乘用车1:商用车2:其它');
$table->tinyInteger("jointdays")->unsigned()->default(0)->comment('衔接点空闲天数');
$table->decimal('averspeed', 10, 6)->default(0.000000)->comment('平均速度');
$table->decimal('averdrivetime', 10, 6)->default(0.000000)->comment('平均驾驶时长');
});
}

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddVirtualDeviceProvince extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('virtual_devices', function (Blueprint $table) {
$table->string('province', 15)->default("")->comment('所属省份');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('virtual_devices', function (Blueprint $table) {
$table->dropColumn('province');
});
}
}