diff --git a/database/migrations/2019_10_23_180807_create_virtual_devices_table.php b/database/migrations/2019_10_23_180807_create_virtual_devices_table.php index 91b19466..317fc630 100644 --- a/database/migrations/2019_10_23_180807_create_virtual_devices_table.php +++ b/database/migrations/2019_10_23_180807_create_virtual_devices_table.php @@ -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('平均驾驶时长'); }); } diff --git a/database/migrations/2020_01_08_110723_add_virtual_device_province.php b/database/migrations/2020_01_08_110723_add_virtual_device_province.php new file mode 100644 index 00000000..4dfa70c0 --- /dev/null +++ b/database/migrations/2020_01_08_110723_add_virtual_device_province.php @@ -0,0 +1,32 @@ +string('province', 15)->default("")->comment('所属省份'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('virtual_devices', function (Blueprint $table) { + $table->dropColumn('province'); + }); + } +}