Test Failed
Push — master ( 0c6ae7...5a133e )
by Yaroslav
02:43
created

MigrationHelper::geonamesDefaultColumns()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 23
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 21
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 20
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 23
ccs 21
cts 21
cp 1
crap 1
rs 9.6
1
<?php
2
3
namespace LaraGeoData\Database;
4
5
use Illuminate\Database\Schema\Blueprint;
6
7
class MigrationHelper
8
{
9
10
    /**
11
     * @param Blueprint $table
12
     */
13 1
    public static function geonamesDefaultColumns(Blueprint $table): void
14
    {
15 1
        $table->unsignedInteger('id');
16 1
        $table->string('name', 200)->nullable()->index();
17 1
        $table->string('ascii_name', 200)->nullable()->index();
18 1
        $table->text('alternate_names')->nullable();
19 1
        $table->decimal('lat', 10, 7)->nullable()->index();
20 1
        $table->decimal('lng', 10, 7)->nullable()->index();
21 1
        $table->char('fclass', 1)->nullable()->index();
22 1
        $table->string('fcode', 10)->nullable()->index();
23 1
        $table->string('country', 2)->nullable()->index();
24 1
        $table->string('cc2', 200)->nullable()->index();
25 1
        $table->string('admin1', 20)->nullable()->index();
26 1
        $table->string('admin2', 80)->nullable()->index();
27 1
        $table->string('admin3', 20)->nullable()->index();
28 1
        $table->string('admin4', 20)->nullable()->index();
29 1
        $table->unsignedInteger('population')->nullable()->index();
30 1
        $table->integer('elevation')->nullable()->index();
31 1
        $table->integer('gtopo30')->nullable()->index();
32 1
        $table->string('timezone', 40)->nullable()->index();
33 1
        $table->dateTime('moddate', 40)->nullable()->index();
34
35 1
        $table->primary('geonameid');
36 1
    }
37
}
38