123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('coach_locations', function (Blueprint $table) {
- $table->comment('技师定位');
- $table->increments('id');
- $table->unsignedBigInteger('coach_id')->comment('技师编号');
- $table->string('type')->default('CURRENT')->comment('地址类型');
- $table->decimal('latitude')->comment('纬度');
- $table->decimal('longitude')->comment('经度');
- $table->string('province')->default('')->comment('省');
- $table->string('city')->default('')->comment('市');
- $table->string('district')->default('')->comment('区');
- $table->string('location')->default('')->comment('定位地址');
- $table->string('area_code')->default('')->comment('行政区划代码');
- $table->timestamps();
- $table->softDeletes();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('coach_locations');
- }
- };
|