Test Setup Failed
Push — master ( ad0913...368932 )
by Dennis
14:58
created

  A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 17
rs 9.7666
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
return new class extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up(): void
13
    {
14
        Schema::create('regions', function (Blueprint $table) {
15
            $table->id();
16
            $table->string('name')->comment('社区名称');
17
            $table->string('city_code')->comment("城市代码");
18
            $table->string('city')->comment("城市名称");
19
            $table->string('province_code')->comment("省份名称");
20
            $table->string('province')->comment("省份名称");
21
            $table->string('county_code')->comment("县区名称");
22
            $table->string('county')->comment("县区名称");
23
            $table->string('address')->comment("地址");
24
            $table->geography('geo', subtype: 'point')->comment("地理信息");
25
            $table->string('model_id')->index()->nullable()->comment("模型ID");
26
            $table->string('model_type')->index()->nullable()->comment('关联类');
27
            $table->timestamps();
28
            $table->comment("地理信息储存表");
29
        });
30
    }
31
32
    /**
33
     * Reverse the migrations.
34
     */
35
    public function down(): void
36
    {
37
        Schema::dropIfExists('regions');
38
    }
39
};
40