Test Failed
Push — master ( 8c8503...dfefa4 )
by Yaroslav
03:40
created

MigrationHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
c 1
b 0
f 0
dl 0
loc 29
ccs 0
cts 21
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A geonamesDefaultColumns() 0 23 1
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
    public static function geonamesDefaultColumns(Blueprint $table): void
14
    {
15
        $table->unsignedInteger('geoname_id');
16
        $table->string('name', 200)->nullable()->index();
17
        $table->string('ascii_name', 200)->nullable()->index();
18
        $table->text('alternate_names')->nullable();
19
        $table->decimal('lat', 10, 7)->nullable()->index();
20
        $table->decimal('lng', 10, 7)->nullable()->index();
21
        $table->char('fclass', 1)->nullable()->index();
22
        $table->string('fcode', 10)->nullable()->index();
23
        $table->string('country', 2)->nullable()->index();
24
        $table->string('cc2', 200)->nullable()->index();
25
        $table->string('admin1', 20)->nullable()->index();
26
        $table->string('admin2', 80)->nullable()->index();
27
        $table->string('admin3', 20)->nullable()->index();
28
        $table->string('admin4', 20)->nullable()->index();
29
        $table->unsignedInteger('population')->nullable()->index();
30
        $table->integer('elevation')->nullable()->index();
31
        $table->integer('gtopo30')->nullable()->index();
32
        $table->string('timezone', 40)->nullable()->index();
33
        $table->dateTime('moddate')->nullable()->index();
34
35
        $table->primary('geoname_id');
36
    }
37
}
38