CreateInlineQueryTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 9 1
A down() 0 3 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 CreateInlineQueryTable extends Migration
10
{
11
    public function up(): void
12
    {
13
        Schema::create('inline_query', static function (Blueprint $table) {
14
            $table->bigInteger('id')->unsigned()->primary()->comment('Unique identifier for this query');
15
            $table->bigInteger('user_id')->nullable()->index('user_id')->comment('Unique user identifier');
16
            $table->char('location')->nullable()->comment('Location of the user');
17
            $table->text('query')->comment('Text of the query');
18
            $table->char('offset')->nullable()->comment('Offset of the result');
19
            $table->dateTime('created_at')->nullable()->comment('Entry date creation');
20
        });
21
    }
22
23
    public function down(): void
24
    {
25
        Schema::dropIfExists('inline_query');
26
    }
27
}
28