Passed
Push — master ( fde606...0af3c0 )
by Armando
08:21
created

CreateChosenInlineResultTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 12
Ratio 100 %

Importance

Changes 0
Metric Value
dl 12
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
use Illuminate\Database\Migrations\Migration;
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Support\Facades\Schema;
8
9
class CreateChosenInlineResultTable extends Migration
10
{
11
    public function up(): void
12
    {
13
        Schema::create('chosen_inline_result', static function (Blueprint $table) {
14
            $table->bigInteger('id', true)->unsigned()->comment('Unique identifier for this entry');
15
            $table->char('result_id')->default('')->comment('Identifier for this result');
16
            $table->bigInteger('user_id')->nullable()->index('user_id')->comment('Unique user identifier');
17
            $table->char('location')->nullable()->comment('Location object, user\'s location');
18
            $table->char('inline_message_id')->nullable()->comment('Identifier of the sent inline message');
19
            $table->text('query')->comment('The query that was used to obtain the result');
20
            $table->dateTime('created_at')->nullable()->comment('Entry date creation');
21
        });
22
    }
23
24
    public function down(): void
25
    {
26
        Schema::dropIfExists('chosen_inline_result');
27
    }
28
}
29